<template>
  <div class="table-mechanism">
		<div class="tableHeader">
			<el-input style="width: 200px; margin-right: 20px;" @change="search()" v-model.trim="queryForm.elderlyNameOrMcode" autocomplete="off" placeholder="请输入老人名称"></el-input>
			<el-input style="width: 200px; margin-right: 20px;" @change="search()" v-model.trim="queryForm.elderlyCode" autocomplete="off" placeholder="请输入老人编号"></el-input>
		</div>
		<el-table :data="list" v-loading="listLoading">
			<el-table-column min-width="150" label="老人编号" prop="elderlyCode"></el-table-column>
			<el-table-column prop="elderlyName" label="姓名" min-width="100"></el-table-column>
			<el-table-column min-width="60" label="性别" prop="genderName"></el-table-column>
			<el-table-column min-width="100" label="证件类型" prop="cardTypeName"></el-table-column>
			<el-table-column min-width="200" label="证件号码" prop="cardNo"></el-table-column>
			<el-table-column min-width="100" label="婚姻状况" prop="maritalStatusName"></el-table-column>
			<el-table-column min-width="100" label="民族" prop="nationName"></el-table-column>
			<el-table-column min-width="100" label="国籍" prop="nationalityName"></el-table-column>
			<el-table-column label="生日" min-width="120">
				<template slot-scope="scope">
					{{scope.row.birth | parseTime('{y}-{m}-{d}')}}
				</template>
			</el-table-column>
			<el-table-column label="农历生日" min-width="120">
				<template slot-scope="scope" v-if="scope.row.lunarCalendarBirth">
					{{scope.row.lunarCalendarBirth | parseTime('{y}-{m}-{d}')}}
				</template>
			</el-table-column>
			<el-table-column label="操作" prop="disabled" min-width="200px" fixed="right">
				<template slot-scope="scope">
					<el-button type="text" @click="openAssessment(scope.row)">添加评估记录</el-button>
					<el-button type="text" @click="assessmentRecordsVisible = true; activeElderlyRow = scope.row; getAssessmentRecords()">查看评估记录</el-button>
				</template>
			</el-table-column>
		</el-table>
		<el-pagination
			:background="background"
			:current-page=queryForm.currPageNo
			:total="total"
			:page-size="queryForm.limit"
			@current-change="handleCurrentChange"
			@size-change="handleSizeChange"
		></el-pagination>
  <div id="chatRecord">
		<el-dialog
      ref="boxs"
      :append-to-body="true"


			:title="showMask ? '查看评估记录' : (assessmentIsEdit ? '编辑评估记录' : '添加评估记录')"
			:visible.sync="assessmentVisible"
			:width="width"
		>
<!--			<div class="showMask" v-if="showMask"></div>-->
<!--			<el-form class="assessmentform" ref="assessmentform" :model="assessmentform" :rules="planRules" label-width="120px" label-position="top">-->
<!--				<el-form-item label="医疗（以下各分级中只需符合一个勾选即为该分数）" prop="radio0">-->
<!--					<el-radio-group v-model="assessmentform.radio0" disabled>-->
<!--						<el-radio :label="3">-->
<!--							<span>3分</span>-->
<!--							<div class="itemRow">-->
<!--								<div class="rowMain">-->
<!--									<el-checkbox-group v-model="assessmentform.checkbox1">-->
<!--										<el-checkbox label="a1" disabled>出现任一管路：-->
<!--											<el-checkbox-group @change="checkChildChange(assessmentform.checkboxChild1, 1, 'checkbox1', 'a1', assessmentform.checkbox1, 1, 3)" v-model="assessmentform.checkboxChild1">-->
<!--												<el-checkbox :label="1001">鼻胃管</el-checkbox>-->
<!--												<el-checkbox :label="1002">静脉营养注射</el-checkbox>-->
<!--												<el-checkbox :label="1003">肠造痿进食</el-checkbox>-->
<!--												<el-checkbox :label="1004">尿管</el-checkbox>-->
<!--											</el-checkbox-group>-->
<!--										</el-checkbox><br>-->
<!--										<el-checkbox label="a6" disabled>需较多医护处理者：-->
<!--											<el-checkbox-group @change="checkChildChange(assessmentform.checkboxChild2, 1, 'checkbox1', 'a6', assessmentform.checkbox1, 1, 3)" v-model="assessmentform.checkboxChild2">-->
<!--												<el-checkbox :label="2001">意识昏迷</el-checkbox>-->
<!--												<el-checkbox :label="2002">帕金森晚期</el-checkbox>-->
<!--												<el-checkbox :label="2003">恶性肿瘤</el-checkbox>-->
<!--												<el-checkbox :label="2004">压疮一二级等</el-checkbox>-->
<!--											</el-checkbox-group>-->
<!--										</el-checkbox>-->
<!--									</el-checkbox-group>-->
<!--								</div>-->
<!--							</div>-->
<!--						</el-radio>-->
<!--						<el-radio :label="2">-->
<!--							<span>2分</span>-->
<!--							<div class="itemRow">-->
<!--								<div class="rowMain">-->
<!--									<el-checkbox-group @change="checkChange(assessmentform.checkbox2, 2, 2)" v-model="assessmentform.checkbox2">-->
<!--										<el-checkbox label="b1" disabled>同时有以下两种管路：-->
<!--											<el-checkbox-group @change="checkChildChange(assessmentform.checkboxChild3, 2, 'checkbox2', 'b1', assessmentform.checkbox2, 2, 2)" v-model="assessmentform.checkboxChild3">-->
<!--												<el-checkbox :label="3001">鼻胃管</el-checkbox>-->
<!--												<el-checkbox :label="3002">尿管</el-checkbox>-->
<!--												<el-checkbox :label="3003">造痿</el-checkbox>-->
<!--												<el-checkbox :label="3004">引流管</el-checkbox><br>-->
<!--											</el-checkbox-group>-->
<!--										</el-checkbox><br>-->
<!--										<el-checkbox label="b6">急性期医疗与护理处置（如体温38℃以上且需点滴注射抗生素者；或压疮三四级）</el-checkbox>-->
<!--									</el-checkbox-group>-->
<!--								</div>-->
<!--							</div>-->
<!--						</el-radio>-->
<!--						<el-radio :label="1">-->
<!--							<span>1分</span>-->
<!--							<div class="itemRow">-->
<!--								<div class="rowMain">-->
<!--									<el-checkbox-group @change="checkChange(assessmentform.checkbox3, 3, 1)" v-model="assessmentform.checkbox3">-->
<!--										<el-checkbox label="c1" disabled>气切管或同时有三种管路：-->
<!--											<el-checkbox-group @change="checkChildChange(assessmentform.checkboxChild4, 3, 'checkbox3', 'c1', assessmentform.checkbox3, 3, 1)" v-model="assessmentform.checkboxChild4">-->
<!--												<el-checkbox :label="4001">气切管</el-checkbox>-->
<!--												<el-checkbox :label="4002">鼻胃管</el-checkbox>-->
<!--												<el-checkbox :label="4003">尿管</el-checkbox>-->
<!--												<el-checkbox :label="4004">造痿</el-checkbox>-->
<!--												<el-checkbox :label="4005">引流管等</el-checkbox>-->
<!--											</el-checkbox-group>-->
<!--										</el-checkbox><br>-->
<!--										<el-checkbox label="c7">有集中医护处置需求者（例如在医养结合机构需转住医疗床位）或临终安宁照护者</el-checkbox>-->
<!--									</el-checkbox-group>-->
<!--								</div>-->
<!--							</div>-->
<!--						</el-radio>-->
<!--					</el-radio-group>-->
<!--				</el-form-item>-->
<!--				<el-form-item label="活动" prop="radio1">-->
<!--					<div class="tips"><div>注意：若三个月曾发生跌倒 <el-checkbox v-model="assessmentform.fallDown"></el-checkbox> 分数应减1分</div></div>-->
<!--					<el-radio-group v-model="assessmentform.radio1">-->
<!--						<el-radio :label="5"><span>5分</span>可外出自行沐浴</el-radio>-->
<!--						<el-radio :label="4"><span>4分</span>屋内平地可行走无跌倒风险、但需协助沐浴与爬楼梯</el-radio>-->
<!--						<el-radio :label="3"><span>3分</span>可自行行走但有危险，需拐杖或助行器</el-radio>-->
<!--						<el-radio :label="2"><span>2分</span>可以自己起床但无法移动、上下轮椅及移动轮椅需部分协助</el-radio>-->
<!--						<el-radio :label="1"><span>1分</span>可自行翻身但无法起床、使用轮椅需完全协助</el-radio>-->
<!--						<el-radio :label="0"><span>0分</span>无法自行翻身</el-radio>-->
<!--					</el-radio-group>-->
<!--				</el-form-item>-->
<!--				<el-form-item label="饮食" prop="radio2">-->
<!--					<el-radio-group v-model="assessmentform.radio2">-->
<!--						<el-radio :label="5"><span>5分</span>可自行用餐，不会弄翻食物（不论是否失智或手部麻痹）</el-radio>-->
<!--						<el-radio :label="4"><span>4分</span>使用固定式餐具可以自行用餐，原则上不需要协助，可能需言语提醒吃饭或提供碎食</el-radio>-->
<!--						<el-radio :label="3"><span>3分</span>需喂食，但吞咽正常不会噎到，但可能需言语催促</el-radio>-->
<!--						<el-radio :label="2"><span>2分</span>需喂食，但食物入口仍无反应，需不断提醒，需碎食糊食或胶状食物</el-radio>-->
<!--						<el-radio :label="1"><span>1分</span>使用鼻胃管或肠造口进食</el-radio>-->
<!--						<el-radio :label="0"><span>0分</span>透过静脉营养注射（点滴、IVH）</el-radio>-->
<!--					</el-radio-group>-->
<!--				</el-form-item>-->
<!--				<el-form-item label="排泄" prop="radio3">-->
<!--					<el-radio-group v-model="assessmentform.radio3">-->
<!--						<el-radio :label="5"><span>5分</span>（2周内）可自行到厕所排便</el-radio>-->
<!--						<el-radio :label="4"><span>4分</span>可自行到厕所或使用便器（不论去了厕所有没有排便），为了安全偶而会使用尿布（或卫生垫），行进过程可能需用助行器</el-radio>-->
<!--						<el-radio :label="3"><span>3分</span>在监护下，须诱导及给予排泄指示，为了安全起见，须使用尿布（或卫生垫）</el-radio>-->
<!--						<el-radio :label="2"><span>2分</span>需时常使用尿布（或卫生垫），更换时可自行抬高屁股</el-radio>-->
<!--						<el-radio :label="1"><span>1分</span>有漏便漏尿、不干净或弄脏床铺的情形，更换尿布无法自行抬高屁股（技术熟悉的护理员可一个人更换尿布）</el-radio>-->
<!--						<el-radio :label="0"><span>0分</span>使用导尿管</el-radio>-->
<!--					</el-radio-group>-->
<!--				</el-form-item>-->
<!--				<el-form-item label="认知和情绪" prop="radio4">-->
<!--					<div class="tips">-->
<!--						<div>认知功能若有以下情形请先勾选：</div>-->
<!--						<div>A. 有以下症状，如物品遗忘、判断力低下、计算能力差、容易掉东西、不愿思考、呆坐、无所事事、情绪低下等</div>-->
<!--						<div>B. 没有定向感或表现出忧郁倾向:不知道现在时间（今天是几月几号）、所在地点（这里是哪里）、今天三餐吃了吗、沮丧、落寞、担心健康、说不如死了算了的话</div>-->
<!--						<div>C. 无法说出自己的名字、意识低下（碰触也没有反应）、人格特质丧失</div>-->
<!--						<div>D. 过去两周的行为异常（如：暴力暴言、昼夜颠倒、被偷妄想、被害妄想、妒忌妄想、听觉幻觉、视觉幻觉、拒绝护理、行为重复、贪食行为、病态收集、无法正常交流、自伤）</div>-->
<!--					</div>-->
<!--					<el-radio-group v-model="assessmentform.radio4">-->
<!--						<el-radio :label="5"><span>5分</span>ABCD皆无，认知功能完整：没有明显的认知功能低下</el-radio>-->
<!--						<el-radio :label="4"><span>4分</span>勾选A，有失智症状但较轻微 （轻度认知功能低下），有定向感， 未影响他人</el-radio>-->
<!--						<el-radio :label="3"><span>3分</span>勾选AD，有失智症状但较轻微（轻度认知功能低下），有定向感，有行为异常，且己影响他人</el-radio>-->
<!--						<el-radio :label="2"><span>2分</span>勾选AB，有主要失智症状但较严重（中高度认知功能低下），定向感有缺失，且未影响他人</el-radio>-->
<!--						<el-radio :label="1"><span>1分</span>勾选ABD或ABCD，有主要失智症状但较严重（中高度认知功能低下），定向感有缺失，有行为异常，且已影响他人</el-radio>-->
<!--						<el-radio :label="0"><span>0分</span>AC或ABC，已无法说出自己的名字、表现出无所是事，但无不正常之行为举止</el-radio>-->
<!--					</el-radio-group>-->
<!--				</el-form-item>-->
<!--			</el-form>-->
<!--			<div slot="footer" class="dialog-footer">-->
<!--				<el-button @click="assessmentVisible = false" >取 消</el-button>-->
<!--				<el-button v-if="!showMask" type="primary" @click="saveAssessment">确 定</el-button>-->
<!--			</div>-->

      <el-steps :active="active">
        <el-step title="评估信息" icon="el-icon-edit"></el-step>
        <el-step title="评估测试" icon="el-icon-edit-outline"></el-step>
        <el-step title="评估报告" icon="el-icon-document-copy"></el-step>
      </el-steps>
      <div class="frist" v-if="active===1"  v-cloak>
        <el-form ref="form" :model="form"    label-width="100px" style="padding-top:40px;margin-bottom: 50px" class="form" >



              <el-form-item label="姓名" required>
<!--                            <el-input v-model="form.elderlyName" style="width:100%" ></el-input>-->
                <span>{{from.elderlyName}}</span>
              </el-form-item>
          <el-form-item label="住址" required>
            <el-cascader
              size="large"
              style="width: 100%"
              :options="provinceAndCity"
              v-model="selectedOption"
            >
            </el-cascader>



          </el-form-item>
          <el-form-item label="详细地址" required >
            <el-input  v-model="from.liveAdress.xxaddress"    style="width: 100%" placeholder="请填写街道（村镇）及门牌号"  ></el-input>

          </el-form-item>
              <el-form-item label="评估日期" required>
                <el-date-picker
                  v-model="form.evaluationDate"
                  type="date"
                  style="width: 100%"

                  placeholder="评估日期">
                </el-date-picker>


              </el-form-item>
          <el-form-item label="评估类别" prop="evaluationType">
            <el-radio-group v-model="form.evaluationType">
              <el-radio :label='1' :disabled="disableds">首次评估</el-radio>
              <el-radio :label='2' :disabled="!disableds">持续评估</el-radio>
              <el-radio :label='3' :disabled="!disableds">复核评估</el-radio>
            </el-radio-group>


          </el-form-item>
          <el-form-item label="评估员" prop="radio">
            <el-select v-model="form.evaluationor" placeholder="请选择" style="width:100%">
              <el-option
                v-for="item in options"
                :key="item.uname"
                :label="item.userName"
                :value="item.uname">
              </el-option>
            </el-select>


          </el-form-item>

        </el-form >
      </div>
      <div class="frist" v-if="active===2"  v-cloak>
        <el-steps direction="vertical" :actives="actives"  style="display: none">
          <el-step title="步骤 1"></el-step>
          <el-step title="步骤 2"></el-step>
          <el-step title="步骤 3" ></el-step>
        </el-steps>
        <div class="frist" v-if="actives===1"  v-cloak>

        <h4>
             一. 日常生活活动评估
            </h4>

        			<el-form class="assessmentform" ref="assessmentform" :model="assessmentform" :rules="planRules" label-width="120px" label-position="top" style="margin-bottom: 50px">

        				<el-form-item label="进食" prop="eatScore">
        					<div class="tips"><div>说明：指用餐具将食物由容器送到口中、咀嚼、吞咽等过程</div></div>
        					<el-radio-group v-model="assessmentform.eatScore" @change="checkChange">
                    <el-radio :label="10" ><span class="right">10分</span>可独立进食（在合理的时间内独立进食准备好的食物）</el-radio>
        						<el-radio :label="5"><span>5分</span>需部分帮助（在进食过程中需要一定的帮助，如协助把持餐具）</el-radio>
        						<el-radio :label="0"><span>0分</span>需极大帮助或完全依赖他人，或有留置营养</el-radio>
        					</el-radio-group>
        				</el-form-item>
        				<el-form-item label="洗澡" prop="laveScore" >
        					<el-radio-group v-model="assessmentform.laveScore" @change="checkChange">
        						<el-radio :label="5"><span>5分</span>准备好洗澡水后，可独立完成洗澡过程</el-radio>
        						<el-radio :label="0"><span>0分</span>在洗澡过程中需要他人帮助</el-radio>
        					</el-radio-group>
        				</el-form-item>
        				<el-form-item label="修饰" prop="decorateScore">
                  <div class="tips"><div>说明：指洗脸、刷牙、梳头、刮脸等</div></div>
        					<el-radio-group v-model="assessmentform.decorateScore" @change="checkChange">

        						<el-radio :label="5"><span>5分</span>可独立完成</el-radio>
        						<el-radio :label="0"><span>0分</span>需要他人帮助</el-radio>
        					</el-radio-group>
        				</el-form-item>
                <el-form-item label="穿衣" prop="gardScore">
                  <div class="tips"><div>说明：指穿衣脱衣、系扣、拉拉链、穿脱鞋袜、系鞋带等</div></div>
                  <el-radio-group v-model="assessmentform.gardScore" @change="checkChange">
                    <el-radio :label="10"><span class="right">10分</span>可独立完成</el-radio>
                    <el-radio :label="5"><span>5分</span>需要部分帮助（能自己穿脱，但需要他人帮助整理自己的衣物、系鞋带、拉拉链）</el-radio>
                    <el-radio :label="0"><span>0分</span>需极大的帮助或完全依赖他人</el-radio>
                  </el-radio-group>
                </el-form-item>
                <el-form-item label="大便控制" prop="stoolScore">

                  <el-radio-group v-model="assessmentform.stoolScore" @change="checkChange">
                    <el-radio :label="10"><span class="right" >10分</span>可控制大便</el-radio>
                    <el-radio :label="5"><span>5分</span>偶尔失控（每周<1次），或需要他人提示</el-radio>
                    <el-radio :label="0"><span>0分</span>完全失控</el-radio>
                  </el-radio-group>
                </el-form-item>
                <el-form-item label="小便控制" prop="urineScore">

                  <el-radio-group v-model="assessmentform.urineScore" @change="checkChange">
                    <el-radio :label="10"><span class="right">10分</span>可控制小便</el-radio>
                    <el-radio :label="5"><span>5分</span>偶尔失控（每周<1次），或需要他人提示</el-radio>
                    <el-radio :label="0"><span>0分</span>完全失控</el-radio>
                  </el-radio-group>
                </el-form-item>
                <el-form-item label="如厕" prop="goToiletScore">
                  <div class="tips"><div>说明：包括去厕所、解开衣裤、擦净、整理衣裤、冲水等</div></div>
                  <el-radio-group v-model="assessmentform.goToiletScore" @change="checkChange">
                    <el-radio :label="10"><span class="right">10分</span>可独立完成</el-radio>
                    <el-radio :label="5"><span>5分</span>需部分帮助（需他人搀扶去厕所、需他人帮忙冲水或整理衣裤等）</el-radio>
                    <el-radio :label="0"><span>0分</span>需极大帮助或完全依赖他人</el-radio>
                  </el-radio-group>
                </el-form-item>
                <el-form-item label="床椅转移" prop="bedChairTransferScore">
                  <div class="tips"><div>说明：包括去厕所、解开衣裤、擦净、整理衣裤、冲水等</div></div>
                  <el-radio-group v-model="assessmentform.bedChairTransferScore" @change="checkChange">
                    <el-radio :label="15"><span class="right">15分</span>可独立完成</el-radio>
                    <el-radio :label="10"><span class="right">10分</span>需部分帮助（需他人搀扶或使用拐杖）</el-radio>
                    <el-radio :label="5"><span>5分</span>需极大帮助（较大程度上依赖他人搀扶和帮助）</el-radio>
                    <el-radio :label="0"><span>0分</span>完全依赖他人</el-radio>
                  </el-radio-group>
                </el-form-item>
                <el-form-item label="平地行走" prop="walkingOnFlatGroundScore">
                  <el-radio-group v-model="assessmentform.walkingOnFlatGroundScore" @change="checkChange">
                    <el-radio :label="15"><span class="right">15分</span>可独立在平地上行走45m</el-radio>
                    <el-radio :label="10"><span class="right">10分</span>需部分帮助（因肢体残疾、平衡能力差、过度衰弱、视力等问题，在一定程度上需他人地搀扶或使用拐杖、助行器等辅助用具）</el-radio>
                    <el-radio :label="5"><span>5分</span>需极大帮助（因肢体残疾、平衡能力差、过度衰弱、视力等问题，在较大程度上依赖他人搀扶，或坐在轮椅上自行移动）</el-radio>
                    <el-radio :label="0"><span>0分</span>完全依赖他人</el-radio>
                  </el-radio-group>
                </el-form-item>
                <el-form-item label="上下楼梯" prop="downStairsScore">
                  <el-radio-group v-model="assessmentform.downStairsScore" @change="checkChange">
                    <el-radio :label="10"><span class="right">10分</span>可独立上下楼梯（连续上下10-15个台阶）</el-radio>
                    <el-radio :label="5"><span>5分</span>需部分帮助（需他人搀扶，或扶着楼梯、使用拐杖等）</el-radio>
                    <el-radio :label="0"><span>0分</span>需极大帮助或完全依赖他人</el-radio>
                  </el-radio-group>
                </el-form-item>
                <el-form-item label="日常生活活动总分" >
                  <div class="tips"  ><div>{{fraction}}分</div></div>
                </el-form-item>
                <el-form-item label="日常生活活动分级"  prop="grade" @change="checkChange">
                  <el-radio-group v-model="assessmentform.grade" :disabled="true">
                    <el-radio :label="0">0 能力完好：总分100分</el-radio>
                    <el-radio :label="1">1 轻度受损：总分65-95分</el-radio>
                    <el-radio :label="2">2 中度受损：总分45-60分</el-radio>
                    <el-radio :label="3">3 重度受损：总分≤40分</el-radio>
                  </el-radio-group>
                </el-form-item>
        </el-form>

      </div>
        <div class="frist" v-if="actives===2"  v-cloak>

          <h4>
            二.精神状态评估表
          </h4>

          <el-form class="assessmentform" ref="spirit" :model="spirit"  :rules="spiritRules" label-width="120px" label-position="top" style="margin-bottom: 50px">

            <el-form-item label="认知功能" prop="cognitiveAbilityScore" key="1" >
              <div class="tips"><div>“我说三样东西，请重复一遍，并记住，一会儿会问您”：苹果、手表、国旗</div></div>
              <div class="tips"><div>（1）画钟实验：“请您在这儿画一个圆形的时钟，在时钟上标出10点45分”</div></div>
              <div class="tips"><div>（2）回忆词语：“现在请您告诉我，刚才我要您记住的三样东西是什么？”
              </div>
              </div>
              <div class="tips"><div>评分</div></div>
              <el-radio-group v-model="spirit.cognitiveAbilityScore"  @change="checkChangespirit">
                <el-radio :label="2"><span>2分</span>已确诊为认知障碍，如老年痴呆</el-radio>
                <el-radio :label="1"><span>1分</span>画钟错误（画的圆不闭锁，或指针位置不准确），或只回忆出0-1个词</el-radio>
                <el-radio :label="0"><span>0分</span>画钟正确（画出一个闭锁圆，指针位置准确），且能回忆出2-3个词</el-radio>
              </el-radio-group>

            </el-form-item>
            <el-form-item label="攻击行为" prop="aggressiveBehaviorScore" key="2">
              <el-radio-group v-model="spirit.aggressiveBehaviorScore"  @change="checkChangespirit">
                <el-radio :label="2"><span>2分</span>每周有几次身体攻击行为，或每日有语言攻击行为</el-radio>
                <el-radio :label="1"><span>1分</span>每月有几次身体攻击行为，或每周有几次语言攻击行为</el-radio>
                <el-radio :label="0"><span>0分</span>无身体攻击行为（如打/踢/推/咬/抓/摔东西）和语言攻击行为（如骂人、语言威胁、尖叫）</el-radio>
              </el-radio-group>
            </el-form-item>
            <el-form-item label="抑郁症状" prop="depressionSymptomsScore" key="3">
              <el-radio-group v-model="spirit.depressionSymptomsScore"  @change="checkChangespirit">
                <el-radio :label="2"><span>2分</span>有自杀念头或自杀行为</el-radio>
                <el-radio :label="1"><span>1分</span>情绪低落、不爱说话、不爱梳洗、不爱活动</el-radio>
                <el-radio :label="0"><span>0分</span>无</el-radio>
              </el-radio-group>
            </el-form-item>
            <el-form-item label="精神状态总分" >
              <div class="tips" ><div>{{spiritfraction}}分</div></div>
            </el-form-item>
            <el-form-item label="精神状态分级"  prop="grade" @change="checkChangespirit">
              <el-radio-group v-model="spirit.grade" :disabled="true">
                <el-radio :label="0">0 能力完好：总分0分</el-radio>
                <el-radio :label="1">1 轻度受损：总分1分</el-radio>
                <el-radio :label="2">2 中度受损：总分2-3分</el-radio>
                <el-radio :label="3">3 重度受损：总分4-6分</el-radio>
              </el-radio-group>
            </el-form-item>

          </el-form>

        </div>
        <div class="frist" v-if="actives===3"  v-cloak>

          <h4>
            三.感知觉与沟通评估表
          </h4>

          <el-form class="assessmentform" ref="perception" :model="perception" :rules="perceptionRules" label-width="120px" label-position="top" style="margin-bottom: 50px">

            <el-form-item label="意识水平" prop="levelOfConsciousnessScore" key="4">

              <el-radio-group v-model="perception.levelOfConsciousnessScore"  @change="checkChangeperception">
                <el-radio :label="3" ><span>3分</span>昏迷，处于浅昏迷时对疼痛刺激有回避和痛苦表情；处于深昏迷时对刺激无反应
                  <div  class="tips" style="margin-left: 55px">（若评定为昏迷，直接评定为重度失能，可不进行以下项目的评估）</div>
                </el-radio>
                <el-radio :label="2"><span>2分</span>昏睡，一般的外界刺激不能使其觉醒，给予较强烈的刺激时可有短时的意识清醒，醒后可简短回答提问，
                  <div  class="tips" style="margin-left: 65px">当刺激减弱后又很快进入睡眠状态</div>
                 </el-radio>
                <el-radio :label="1"><span>1分</span>嗜睡，表现为睡眠状态过度延长。当呼唤或推动其肢体时可唤醒，并能进行正确的交谈或执行指令，停止刺激后又继续入睡</el-radio>
                <el-radio :label="0"><span>0分</span>神志清醒，对周围环境警觉</el-radio>
              </el-radio-group>

            </el-form-item>
            <el-form-item label="视力" prop="visionScore" key="5">
              <div class="tips"><div>说明:若平日带老花镜或近视镜，应在佩戴眼镜的情况下评估

              </div></div>
              <el-radio-group v-model="perception.visionScore"  @change="checkChangeperception">
                <el-radio :label="4"><span>4分</span>没有视力，眼睛不能跟随物体移动</el-radio>
                <el-radio :label="3"><span>3分</span>辨认物体有困难，但眼睛能跟随物体移动，只能看到光、颜色和形状</el-radio>
                <el-radio :label="2"><span>2分</span>视力有限，看不清报纸大标题，但能辨认物体</el-radio>
                <el-radio :label="1"><span>1分</span>能看清楚大字体，但看不清书报上的标准字体</el-radio>
                <el-radio :label="0"><span>0分</span>能看清书报上的标准字体</el-radio>
              </el-radio-group>
            </el-form-item>
              <el-form-item label="听力" prop="hearingScore" key="6">
                <div class="tips"><div>说明:若平时佩戴助听器，应在佩戴助听器的情况下评估
                </div></div>
                <el-radio-group v-model="perception.hearingScore"  @change="checkChangeperception">
                  <el-radio :label="4"><span>4分</span>完全听不见</el-radio>
                  <el-radio :label="3"><span>3分</span>讲话者大声说话或说话很慢，才能部分听见</el-radio>
                  <el-radio :label="2"><span>2分</span>正常交流有些困难，需在安静的环静或大声说话才能听到</el-radio>
                  <el-radio :label="1"><span>1分</span>在轻声说话或说话距离超过2米时听不清</el-radio>
                  <el-radio :label="0"><span>0分</span>可正常交谈，能听到电视、电话、门铃的声音</el-radio>
                </el-radio-group>
              </el-form-item>
            <el-form-item label="沟通交流" prop="communicationScore" key="7">
              <div class="tips"><div>说明:包括非语言沟通

              </div></div>
              <el-radio-group v-model="perception.communicationScore"  @change="checkChangeperception">
                <el-radio :label="3"><span>3分</span>不能表达需要或理解他人的话</el-radio>
                <el-radio :label="2"><span>2分</span>表达需要或理解有困难，需频繁重复或简化口头表达</el-radio>
                <el-radio :label="1"><span>1分</span>能够表达自己的需要及理解别人的话，但需要增加时间或给予帮助</el-radio>
                <el-radio :label="0"><span>0分</span>无困难，能与他人正常沟通和交流</el-radio>
              </el-radio-group>
            </el-form-item>

            <el-form-item label="感知觉与沟通分级"  prop="grade" @change="checkChangeperception" key="8">
              <el-radio-group v-model="perception.grade" :disabled="true">
                <el-radio :label="0">0 能力完好：意识清醒，且视力和听力评为0或1，沟通评为0
                </el-radio>
                <el-radio :label="1">1 轻度受损：意识清醒，但视力或听力中至少一项评为2，或沟通评为1
                </el-radio>
                <el-radio :label="2">2 中度受损：意识清醒，但视力或听力中至少一项评为3，或沟通评为2
                </el-radio>
                <el-radio :label="3">3 重度受损：意识清醒或嗜睡，但视力或听力中至少一项评为4，或沟通评为3；或昏睡/昏迷</el-radio>
              </el-radio-group>
            </el-form-item>

          </el-form>

        </div>
        <div class="frist" v-if="actives===4"  v-cloak>

          <h4>
            四.社会参与评估表
          </h4>

          <el-form class="assessmentform" ref="society" :rules="societyRules" :model="society"  label-width="120px" label-position="top" style="margin-bottom: 50px">

            <el-form-item label="生活能力" prop="survivalSkillsScore" key="9">

              <el-radio-group v-model="society.survivalSkillsScore"  @change="checkChangesociety">
                <el-radio :label="4" ><span>4分</span>个人基本生活事务（如饮食、二便）需要部分帮助或完全依赖他人帮助

                </el-radio>
                <el-radio :label="3" ><span>3分</span>个人基本生活事务能自理（如饮食、二便），在督促下可洗漱

                </el-radio>
                <el-radio :label="2"><span>2分</span>个人生活能自理；只有在他人帮助下才能做些家务，但质量不好

                </el-radio>
                <el-radio :label="1"><span>1分</span>除个人生活自理外，只能做简单的家务（如洗碗、叠被、整理衣物等），家庭事务安排欠条理。</el-radio>
                <el-radio :label="0"><span>0分</span>除个人生活自理外（如饮食、洗漱、穿戴、二便），能料理家务（如做饭、洗衣、擦玻璃、铺床等）或当家管理事务 <div  class="tips" style="margin-left: 65px">（如钱财管理）。</div></el-radio>
              </el-radio-group>

            </el-form-item>
            <el-form-item label="工作能力" prop="abilityToWorkScore" key="10">
              <el-radio-group v-model="society.abilityToWorkScore"  @change="checkChangesociety">
                <el-radio :label="4"><span>4分</span>对以往的知识或技能全部磨灭</el-radio>
                <el-radio :label="3"><span>3分</span>对熟练工作只有一些片段保留，技能全部遗忘</el-radio>
                <el-radio :label="2"><span>2分</span>原来熟练的脑力工作或体力技巧性工作明显不如以往，部分遗忘</el-radio>
                <el-radio :label="1"><span>1分</span>原来熟练的脑力工作或体力技巧性工作能力有所下降</el-radio>
                <el-radio :label="0"><span>0分</span>原来熟练的脑力工作或体力技巧性工作可照常进行</el-radio>
              </el-radio-group>
            </el-form-item>
            <el-form-item label="时间/空间定向" prop="spatialOrientationScore" key="11">
              <el-radio-group v-model="society.spatialOrientationScore"  @change="checkChangesociety">
                <el-radio :label="4"><span>4分</span>无时间观念；不能单独外出</el-radio>
                <el-radio :label="3"><span>3分</span>时间观念很差，年、月、日不清楚，可知上午或下午；只能在左邻右舍间串门，对现住地不知名称和方位</el-radio>
                <el-radio :label="2"><span>2分</span>时间观念较差，年、月、日不清楚，可知上半年或下半年；只能单独在家附近行动，对现住地只知名称，不知道方位</el-radio>
                <el-radio :label="1"><span>1分</span>时间观念有些下降，年、月、日清楚，但有时相差几天；可单独来往于近街，知道现住地的名称和方位，但不知回家路线</el-radio>
                <el-radio :label="0"><span>0分</span>时间观念（年、月、日、时）清楚；可单独出远门，可自行熟练使用大众交通工具（乘坐火车、公交、地铁等）、能很快
                  <div  class="tips" style="margin-left: 65px">掌握新环境的方位</div>  </el-radio>
              </el-radio-group>
            </el-form-item>
            <el-form-item label="人物定向" prop="characterOrientationScore" key="12">
              <el-radio-group v-model="society.characterOrientationScore"  @change="checkChangesociety">
                <el-radio :label="4"><span>4分</span>不辨熟人和生人</el-radio>
                <el-radio :label="3"><span>3分</span>只认识常同住的亲人和经常接触的服务人员，可称呼子女或孙子女，可辨熟人和生人</el-radio>
                <el-radio :label="2"><span>2分</span>能称呼家中人，或只能照样称呼，不知其关系，不辨辈分</el-radio>
                <el-radio :label="1"><span>1分</span>知道家中近亲的关系，可识别经常接触的服务人员（医务人员、社工、护理员等），不会分辨陌生人的大致年龄，
                  <div  class="tips" style="margin-left: 65px">不能称呼陌生人</div> </el-radio>
                <el-radio :label="0"><span>0分</span>知道周围人们的关系，知道常见人物称谓的意义(如祖孙、叔伯、姑姨、婆媳等)；可分辨陌生人的大致年龄和身份，
                  <div  class="tips" style="margin-left: 65px">可用适当称呼</div></el-radio>
              </el-radio-group>
            </el-form-item>
            <el-form-item label="社会交往能力" prop="socialSkillsScore" key="13">
              <el-radio-group v-model="society.socialSkillsScore"  @change="checkChangesociety">
                <el-radio :label="4"><span>4分</span>难以与人接触</el-radio>
                <el-radio :label="3"><span>3分</span>勉强可与人交往，谈吐内容不清楚，表情不恰当</el-radio>
                <el-radio :label="2"><span>2分</span>脱离社会，可被动接触，不会主动待人，谈话中很多不适词句，容易上当受骗</el-radio>
                <el-radio :label="1"><span>1分</span>能适应单纯环境（如社区日间照料中心、养老机构内环境等），主动接触人，初见面时难让人发现智力问题，不能理解隐喻语</el-radio>
                <el-radio :label="0"><span>0分</span>参与社会，在社会环境有一定的适应能力，待人接物恰当</el-radio>
              </el-radio-group>
            </el-form-item>
            <el-form-item label="社会参与总分" >
              <div class="tips"  ><div>{{societyfraction}}分</div></div>
            </el-form-item>
            <el-form-item label="社会参与分级"  prop="grade" @change="checkChange">
              <el-radio-group v-model="society.grade" :disabled="true">
                <el-radio :label="0">0 能力完好：总分0-2分</el-radio>
                <el-radio :label="1">1 轻度受损：总分3-7分</el-radio>
                <el-radio :label="2">2 中度受损：总分8-13分</el-radio>
                <el-radio :label="3">3 重度受损：总分14-20分</el-radio>
              </el-radio-group>
            </el-form-item>

          </el-form>

        </div>
       <el-button  style="float:right;margin-right: 20px;margin-left:40px;margin-top:-20px;"  @click="nexts()" v-if=" actives!=4">下一页</el-button>
        <el-button  style="float:right; margin-top:-20px;" @click="prves" v-if="  actives==2 || actives==3 ||actives==4">上一页</el-button>
      </div>
      <div class="frist" v-if="active===3"  v-cloak>
        <h2 style="text-align: center">
          老年人自理能力评估报告
        </h2>
        <el-form class="assessmentform" :model="ability"  label-width="120px" label-position="top" style="margin-bottom: 50px">

        <el-form-item label="一级指标分级">
          <span >日常生活活动  <span style="color: #1386d2">{{ability.adAssessmentGrade}} 级</span></span></br>
          <span>精神状态 <span style="color: #1386d2">{{ability.msAssessmentGrade	}} 级</span></span></br>
          <span>感知觉与沟通 <span style="color: #1386d2">{{ability.pcAssessmentGrade}} 级</span></span></br>
          <span>社会参与 <span style="color: #1386d2">{{ability.spAssessmentGrade	}} 级</span></span>


        </el-form-item>
        <el-form-item label="老年人能力初步等级" prop="abilityInitialLevel">
          <el-radio-group v-model="ability.abilityInitialLevel" >
            <el-radio :label="3"  :disabled="true"><span class="right">3 重度失能</span></el-radio>
            <el-radio :label="2" :disabled="true"><span>2 中度失能</span></el-radio>
            <el-radio :label="1" :disabled="true"><span>1 轻度失能</span></el-radio>
            <el-radio :label="0" :disabled="true"><span>0 能力完好</span></el-radio>
          </el-radio-group>

        </el-form-item>
        <el-form-item label="等级变更条款" prop="changeClause" v-if="ability.changeClause">
          <el-radio-group v-model="ability.changeClause[0]" @change="changeClause" >
            <el-radio :label="1" :disabled="isdisabled" ><span class="right">1 有认知障碍/痴呆、精神疾病者，在原有能力级别上提高一个等级；
</span></el-radio>
            <el-radio :label="2" :disabled="isdisabled"><span>2 近30天内发生过2次及以上跌倒、噎食、自杀、走失者，在原有能力级别上提高一个等级；</span></el-radio>
            <el-radio :label="3" :disabled="isdisabled"><span>3 处于昏迷状态者，直接评定为重度失能；</span></el-radio>
            <el-radio :label="4" :disabled="true"><span>4 若初步等级确定为“3重度失能”，则不考虑上述1-3中各情况对最终等级的影响，等级不再提高</span></el-radio>
          </el-radio-group>

        </el-form-item>
        <el-form-item label="老年人能力最终等级" prop="abilityFinalLevel">
          <el-radio-group v-model="ability.abilityFinalLevel">
            <el-radio :label="3" :disabled="true" ><span class="right">3 重度失能
</span></el-radio>
            <el-radio :label="2" :disabled="true"><span>2 中度失能</span></el-radio>
            <el-radio :label="1" :disabled="true"><span>1 轻度失能</span></el-radio>
            <el-radio :label="0" :disabled="true"><span>0 能力完好</span></el-radio>
          </el-radio-group>

        </el-form-item>
        <el-form-item>
          <div class="tips"><div>注：老年人能力初步等级划分标准</div></div>

          <div class="tips" ><div><span style="color: #333333;font-size: 14px;font-weight: bold">0 能力完好</span></div></div>
          <div class="tips" ><div>日常生活活动、精神状态、感知觉与沟通分级均为0，社会参与分级为0或1</div></div>

          <div class="tips" ><div><span style="color: #333333;font-size: 14px;font-weight: bold">1 轻度失能</span></div></div>
          <div class="tips" >
            <div>
              日常生活活动分级为0，但精神状态、感知觉与沟通中至少一项分级为1及以上，或社会参与的分级为2；
            </div>
            <div class="tips">
              或日常生活活动分级为1，精神状态、感知觉与沟通、社会参与中至少有一项的分级为0或1
            </div>
            <div class="tips" ><div><span style="color: #333333;font-size: 14px;font-weight: bold">2 中度失能</span></div></div>
            <div class="tips">
              日常生活活动分级为1，但精神状态、感知觉与沟通、社会参与均为2，或有一项为3；
            </div>
            <div class="tips">
              或日常生活活动分级为2，且精神状态、感知觉与沟通、社会参与中有1-2项的分级为1或2
            </div>
            <div class="tips" ><div><span style="color: #333333;font-size: 14px;font-weight: bold">3 重度失能</span></div></div>
            <div class="tips">
              日常生活活动的分级为3；
            </div>
            <div class="tips">
              或日常生活活动、精神状态、感知觉与沟通、社会参与分级均为2；
            </div>
            <div class="tips">
              或日常生活活动分级为2，且精神状态、感知觉与沟通、社会参与中至少有一项分级为3
            </div>
          </div>

        </el-form-item>


        </el-form>
      </div>



      <el-button  style="float:right; margin-top:-20px;margin-left: 20px"  type="warning"  v-if="  active==3 " @click="addAssessmentReport">保存</el-button>

      <el-button  style="float:right; margin-top:-20px;" @click="prve()"  type="success"   v-if=" active==2&&actives==1  || active==3 " >上一步</el-button>
      <el-button  style="float:right;margin-right: 20px;margin-left:40px;margin-top:-20px;"   type="primary" @click="next()" v-if="   active==1|| active==2 && actives==4  ">下一步</el-button>

		</el-dialog>
  </div>
		<el-dialog
			title="评估记录"
			:visible.sync="assessmentRecordsVisible"
			width="500px"

      @close='closeDialog'
		>
			<!-- <div class="header">
				<el-button @click="openAssessment(activeElderlyRow)">添加评估记录</el-button>
			</div>
			<br> -->
			<div class="planlist">
				<el-table
					:data="assessmentRecords"
					v-loading="assessmentRecordsLoading"
				>
					<el-table-column label="创建时间" min-width="120">
						<template slot-scope="scope">
							{{scope.row.createTime | parseTime('{y}-{m}-{d}')}}
						</template>
					</el-table-column>
					<el-table-column min-width="100" label="评估等级">

            <template slot-scope="scope" v-if="scope.row.selfCareAbilityAssessmentReport" >
              <div>
                <el-tag >{{scope.row.selfCareAbilityAssessmentReport.abilityFinalLevel}}级</el-tag>
              </div>

            </template>
          </el-table-column>
          <el-table-column min-width="100" label="状态">
            <template slot-scope="scope">
              <div v-if="scope.row.status==true" >
                <el-tag type="success">已完成</el-tag>
              </div>
              <div v-if="scope.row.status==false">
                <el-tag type="warning">未完成</el-tag>
              </div>
            </template>
          </el-table-column>
					<el-table-column label="操作" prop="disabled" min-width="130px" fixed="right">
						<template slot-scope="scope">
							<template>
								<el-button type="text" @click="submitAssessment(1,scope.row.number)">查看详情</el-button>
                <el-button type="text" @click="stamp(0,scope.row.number)"  v-if="scope.row.status">
                  打印
                </el-button>
							</template>
						</template>
					</el-table-column>
				</el-table>

				<el-pagination
					:background="background"
					:current-page=assessmentRecordsQueryForm.currPageNo
					:total="assessmentRecordsTotal"
					:page-size="assessmentRecordsQueryForm.limit"
					@current-change="assessmentRecordsHandleCurrentChange"
					@size-change="assessmentRecordsHandleSizeChange"
				></el-pagination>
			</div>
		</el-dialog>
    <div ref="print" class="mytables">

      <h3 style="text-align: center;">日常生活活动评估</h3>
      <div style="page-break-after:always">
        <table style="width: 100%" class="mytable" >

          <tr>
            <td class="ttitle ">姓名</td>
            <td class="datalist"  >{{from.elderlyName}}</td>
            <td class="ttitle ">评估日期</td>
            <td class="datalist " > {{form.evaluationDate | parseTime('{y}-{m}-{d}')}}</td>


          </tr>

          <tr>
            <td class="ttitle ">评估类别</td>
            <td class="datalist "  >
              {{form.evaluationTypeName}}
            </td>

            <td class="ttitle ">评估员</td>
            <td class="datalist " >{{form.evaluationor}}</td>
          </tr>
          <tr>

            <td class="ttitle ">住址</td>
            <td class="datalist " colspan="3" > <el-cascader
              size="large"

              style="text-align: center;border: 0"

              class="disabled"
              :options="provinceAndCity"
              v-model="selectedOption"
            >
            </el-cascader>
              <span style="font-size: 14px;">/ {{from.liveAdress.xxaddress}}</span></td>

          </tr>



          <tr>
            <td class="ttitle " colspan="4">日常生活活动评估</td>
          </tr>
          <tr>
            <td class="ttitle " >进食</td>
            <td class="ttitle " colspan="3">
              <div class="tips " style="line-height: 45px; ">
                <el-radio-group v-model="assessmentform.eatScore" >

                  <el-radio :label="10" v-if="assessmentform.eatScore==10">可独立进食（在合理的时间内独立进食准备好的食物）</el-radio>
                  <el-radio :label="5" v-if="assessmentform.eatScore==5">需部分帮助（在进食过程中需要一定的帮助，如协助把持餐具）</el-radio>
                  <el-radio :label="0" v-if="assessmentform.eatScore==0">需极大帮助或完全依赖他人，或有留置营养</el-radio>
                </el-radio-group>

              </div>

            </td>
          </tr>
          <tr>
            <td class="ttitle " >洗澡</td>
            <td class="ttitle " colspan="3">
              <div class="tips " style="line-height: 45px; ">
                <el-radio-group v-model="assessmentform.laveScore" >
                  <el-radio :label="5" v-if='assessmentform.laveScore==5'>准备好洗澡水后，可独立完成洗澡过程</el-radio>
                  <el-radio :label="0" v-if='assessmentform.laveScore==0'>在洗澡过程中需要他人帮助</el-radio>
                </el-radio-group>
              </div>

            </td>
          </tr>
          <tr>
            <td class="ttitle " >修饰</td>
            <td class="ttitle " colspan="3">
              <div class="tips " style="line-height: 45px; ">
                <el-radio-group v-model="assessmentform.decorateScore" >

                  <el-radio :label="5" v-if="assessmentform.decorateScore==5">可独立完成</el-radio>
                  <el-radio :label="0" v-if="assessmentform.decorateScore==0">需要他人帮助</el-radio>
                </el-radio-group>
              </div>

            </td>
          </tr>
          <tr>
            <td class="ttitle " >穿衣</td>
            <td class="ttitle " colspan="3">
              <div class="tips " style="line-height: 45px; ">
                <el-radio-group v-model="assessmentform.gardScore" >
                  <el-radio :label="10" v-if="assessmentform.gardScore==10">可独立完成</el-radio>
                  <el-radio :label="5" v-if="assessmentform.gardScore==5">需要部分帮助（能自己穿脱，但需要他人帮助整理自己的衣物、系鞋带、拉拉链）</el-radio>
                  <el-radio :label="0" v-if="assessmentform.gardScore==0">需极大的帮助或完全依赖他人</el-radio>
                </el-radio-group></div>

            </td>
          </tr>
          <tr>
            <td class="ttitle " >大便控制</td>
            <td class="ttitle " colspan="3">
              <div class="tips " style="line-height: 45px; ">
                <el-radio-group v-model="assessmentform.stoolScore" >
                  <el-radio :label="10" v-if="assessmentform.stoolScore==10">可控制大便</el-radio>
                  <el-radio :label="5" v-if="assessmentform.stoolScore==5">偶尔失控（每周<1次），或需要他人提示</el-radio>
                  <el-radio :label="0" v-if="assessmentform.stoolScore==0">完全失控</el-radio>
                </el-radio-group>
              </div>

            </td>
          </tr>
          <tr>
            <td class="ttitle " >小便控制</td>
            <td class="ttitle " colspan="3">
              <div class="tips " style="line-height: 45px; ">
                <el-radio-group v-model="assessmentform.urineScore">
                  <el-radio :label="10" v-if="assessmentform.urineScore==10">可控制小便</el-radio>
                  <el-radio :label="5" v-if="assessmentform.urineScore==5">偶尔失控（每周<1次），或需要他人提示</el-radio>
                  <el-radio :label="0" v-if="assessmentform.urineScore==0">完全失控</el-radio>
                </el-radio-group>
              </div>

            </td>
          </tr>
          <tr>
            <td class="ttitle " >如厕</td>
            <td class="ttitle " colspan="3">
              <div class="tips " style="line-height: 45px; ">
                <el-radio-group v-model="assessmentform.goToiletScore" @change="checkChange">
                  <el-radio :label="10" v-if="assessmentform.goToiletScore==10">可独立完成</el-radio>
                  <el-radio :label="5" v-if="assessmentform.goToiletScore==5">需部分帮助（需他人搀扶去厕所、需他人帮忙冲水或整理衣裤等）</el-radio>
                  <el-radio :label="0" v-if="assessmentform.goToiletScore==0">需极大帮助或完全依赖他人</el-radio>
                </el-radio-group>
              </div>

            </td>
          </tr>
          <tr>
            <td class="ttitle " >床椅转移</td>
            <td class="ttitle " colspan="3">
              <div class="tips " style="line-height: 45px; ">
                <el-radio-group v-model="assessmentform.bedChairTransferScore" >
                  <el-radio :label="15" v-if="assessmentform.bedChairTransferScore==15">可独立完成</el-radio>
                  <el-radio :label="10" v-if="assessmentform.bedChairTransferScore==10">需部分帮助（需他人搀扶或使用拐杖）</el-radio>
                  <el-radio :label="5" v-if="assessmentform.bedChairTransferScore==5">需极大帮助（较大程度上依赖他人搀扶和帮助）</el-radio>
                  <el-radio :label="0" v-if="assessmentform.bedChairTransferScore==0">完全依赖他人</el-radio>
                </el-radio-group></div>

            </td>
          </tr>
          <tr>
            <td class="ttitle " >平地行走</td>
            <td class="ttitle " colspan="3">
              <div class="tips " style="line-height: 45px; ">
                <el-radio-group v-model="assessmentform.walkingOnFlatGroundScore" >
                  <el-radio :label="15" v-if="assessmentform.walkingOnFlatGroundScore==15">可独立在平地上行走45m</el-radio>
                  <el-radio :label="10" v-if="assessmentform.walkingOnFlatGroundScore==10">需部分帮助（因肢体残疾、平衡能力差、过度衰弱、视力等问题，在一定程度上
                    <div   style="margin-left: 65px;line-height: 0px">需他人地搀扶或使用拐杖、助行器等辅助用具）</div></el-radio>
                  <el-radio :label="5" v-if="assessmentform.walkingOnFlatGroundScore==5">需极大帮助（因肢体残疾、平衡能力差、过度衰弱、视力等问题，
                    <div   style="margin-left: 65px;line-height: 0px">在较大程度上依赖他人搀扶，或坐在轮椅上自行移动）</div></el-radio>
                  <el-radio :label="0" v-if="assessmentform.walkingOnFlatGroundScore==0">完全依赖他人</el-radio>
                </el-radio-group></div>

            </td>
          </tr>
          <tr>
            <td class="ttitle " >上下楼梯</td>
            <td class="ttitle " colspan="3">
              <div class="tips " style="line-height: 45px; ">
                <el-radio-group v-model="assessmentform.downStairsScore" >
                  <el-radio :label="10" v-if="assessmentform.downStairsScore==10">可独立上下楼梯（连续上下10-15个台阶）</el-radio>
                  <el-radio :label="5" v-if="assessmentform.downStairsScore==5">需部分帮助（需他人搀扶，或扶着楼梯、使用拐杖等）</el-radio>
                  <el-radio :label="0" v-if="assessmentform.downStairsScore==0">需极大帮助或完全依赖他人</el-radio>
                </el-radio-group></div>

            </td>
          </tr>
          <tr>
            <td class="ttitle " >日常生活活动总分</td>
            <td class="ttitle " colspan="3">
              <div class="tips " style="line-height: 45px; ">{{fraction}}分</div>

            </td>
          </tr>
          <tr>
            <td class="ttitle " >日常生活活动分级</td>
            <td class="ttitle " colspan="3">
              <div class="tips " style="line-height: 45px; ">
                <el-radio-group v-model="assessmentform.grade" >
                  <el-radio :label="0" v-if="assessmentform.grade==0"> 能力完好：总分100分</el-radio>
                  <el-radio :label="1" v-if="assessmentform.grade==1"> 轻度受损：总分65-95分</el-radio>
                  <el-radio :label="2" v-if="assessmentform.grade==2"> 中度受损：总分45-60分</el-radio>
                  <el-radio :label="3" v-if="assessmentform.grade==3"> 重度受损：总分≤40分</el-radio>
                </el-radio-group>
              </div>

            </td>
          </tr>




        </table>
      </div>
      <div style="page-break-after:always">
        <h3 style="text-align: center;">精神状态评估</h3>
        <table style="width: 100%" class="mytable" >

          <tr>
            <td class="ttitle seal">姓名</td>
            <td class="datalist" seal >{{from.elderlyName}}</td>
            <td class="ttitle seal">评估日期</td>
            <td class="datalist seal" > {{form.evaluationDate | parseTime('{y}-{m}-{d}')}}</td>


          </tr>

          <tr>
            <td class="ttitle seal">评估类别</td>
            <td class="datalist seal"  >
              {{form.evaluationTypeName}}
            </td>

            <td class="ttitle seal">评估员</td>
            <td class="datalist seal" >{{form.evaluationor}}</td>
          </tr>
          <tr>

            <td class="ttitle seal">住址</td>
            <td class="datalist seal" colspan="3" >

              <el-cascader
                size="large"

                style="text-align: center;border: 0"

                class="disabled"
                :options="provinceAndCity"
                v-model="selectedOption"
              >
              </el-cascader>
              <span style="font-size: 14px;">/ {{from.liveAdress.xxaddress}}</span>
            </td>

          </tr>



          <tr>
            <td class="ttitle " colspan="4">精神状态评估</td>
          </tr>
          <tr>
            <td class="ttitle " >认知功能</td>
            <td class="ttitle  " colspan="3">
              <div class="tips " style="line-height: 45px; ">
                <el-radio-group v-model="spirit.cognitiveAbilityScore"  >
                  <el-radio :label="2" v-if="spirit.cognitiveAbilityScore==2">已确诊为认知障碍，如老年痴呆</el-radio>
                  <el-radio :label="1" v-if="spirit.cognitiveAbilityScore==1">画钟错误（画的圆不闭锁，或指针位置不准确），或只回忆出0-1个词</el-radio>
                  <el-radio :label="0" v-if="spirit.cognitiveAbilityScore==0">画钟正确（画出一个闭锁圆，指针位置准确），且能回忆出2-3个词</el-radio>
                </el-radio-group>
              </div>

            </td>
          </tr>
          <tr>
            <td class="ttitle " >攻击行为</td>
            <td class="ttitle  " colspan="3">
              <div class="tips " style="line-height: 45px; ">
                <el-radio-group v-model="spirit.aggressiveBehaviorScore"  >
                  <el-radio :label="2" v-if="spirit.aggressiveBehaviorScore==2">每周有几次身体攻击行为，或每日有语言攻击行为</el-radio>
                  <el-radio :label="1" v-if="spirit.aggressiveBehaviorScore==1">每月有几次身体攻击行为，或每周有几次语言攻击行为</el-radio>
                  <el-radio :label="0" v-if="spirit.aggressiveBehaviorScore==0">无身体攻击行为（如打/踢/推/咬/抓/摔东西）和语言攻击行为（如骂人、语言威胁、尖叫）</el-radio>
                </el-radio-group>
              </div>

            </td>
          </tr>
          <tr>
            <td class="ttitle " >抑郁症状</td>
            <td class="ttitle  " colspan="3">
              <div class="tips " style="line-height: 45px; ">
                <el-radio-group v-model="spirit.depressionSymptomsScore"  >
                  <el-radio :label="2" v-if="spirit.depressionSymptomsScore==2">有自杀念头或自杀行为</el-radio>
                  <el-radio :label="1" v-if="spirit.depressionSymptomsScore==1">情绪低落、不爱说话、不爱梳洗、不爱活动</el-radio>
                  <el-radio :label="0" v-if="spirit.depressionSymptomsScore==0">无</el-radio>
                </el-radio-group></div>

            </td>
          </tr>
          <tr>
            <td class="ttitle " >精神状态总分</td>
            <td class="ttitle  " colspan="3">
              <div class="tips " style="line-height: 45px; ">{{spiritfraction}}分</div>

            </td>
          </tr>
          <tr>
            <td class="ttitle " >精神状态分级</td>
            <td class="ttitle  " colspan="3">
              <div class="tips " style="line-height: 45px; ">
                <el-radio-group v-model="spirit.grade" >
                  <el-radio :label="0" v-if="spirit.grade==0"> 能力完好：总分0分</el-radio>
                  <el-radio :label="1" v-if="spirit.grade==1"> 轻度受损：总分1分</el-radio>
                  <el-radio :label="2" v-if="spirit.grade==2"> 中度受损：总分2-3分</el-radio>
                  <el-radio :label="3" v-if="spirit.grade==3"> 重度受损：总分4-6分</el-radio>
                </el-radio-group></div>

            </td>
          </tr>



        </table>
      </div>
      <div style="page-break-after:always">
        <h3 style="text-align: center;">感知觉与沟通评估</h3>
        <table style="width: 100%" class="mytable" >

          <tr>
            <td class="ttitle seal">姓名</td>
            <td class="datalist"  >{{from.elderlyName}}</td>
            <td class="ttitle seal">评估日期</td>
            <td class="datalist seal" > {{form.evaluationDate | parseTime('{y}-{m}-{d}')}}</td>


          </tr>

          <tr>
            <td class="ttitle seal">评估类别</td>
            <td class="datalist seal"  >
              {{form.evaluationTypeName}}
            </td>

            <td class="ttitle seal">评估员</td>
            <td class="datalist seal" >{{form.evaluationor}}</td>
          </tr>
          <tr>

            <td class="ttitle seal">住址</td>
            <td class="datalist seal" colspan="3" > <el-cascader
              size="large"

              style="text-align: center;border: 0"

              class="disabled"
              :options="provinceAndCity"
              v-model="selectedOption"
            >
            </el-cascader>
              <span style="font-size: 14px;">/ {{from.liveAdress.xxaddress}}</span></td>

          </tr>



          <tr>
            <td class="ttitle " colspan="4">感知觉与沟通评估</td>
          </tr>
          <tr>
            <td class="ttitle " >意识水平</td>
            <td class="ttitle  " colspan="3">
              <div class="tips " style="line-height: 45px; ">
                <el-radio-group v-model="perception.levelOfConsciousnessScore" >
                  <el-radio :label="3" v-if="perception.levelOfConsciousnessScore==3" >昏迷，处于浅昏迷时对疼痛刺激有回避和痛苦表情；处于深昏迷时对刺激无反应
                    <div  class="tips" style="margin-left: 55px">（若评定为昏迷，直接评定为重度失能，可不进行以下项目的评估）</div>
                  </el-radio>
                  <el-radio :label="2" v-if="perception.levelOfConsciousnessScore==2">昏睡，一般的外界刺激不能使其觉醒，给予较强烈的刺激时可有短时的意识清醒，
                    <div  class="tips" style="margin-left: 65px">醒后可简短回答提问当刺激减弱后又很快进入睡眠状态</div>
                  </el-radio>
                  <el-radio :label="1" v-if="perception.levelOfConsciousnessScore==1">嗜睡，现为睡眠状态过度延长。当呼唤或推动其肢体时可唤醒，
                    <div  class="tips" style="margin-left: 65px"> ，停止刺激后又继续入睡</div>
                  </el-radio>
                  <el-radio :label="0" v-if="perception.levelOfConsciousnessScore==0">神志清醒，对周围环境警觉</el-radio>
                </el-radio-group></div>

            </td>
          </tr>
          <tr>
            <td class="ttitle " >视力</td>
            <td class="ttitle " colspan="3">
              <div class="tips " style="line-height: 45px; ">
                <el-radio-group v-model="perception.visionScore"  >
                  <el-radio :label="4" v-if="perception.visionScore==4">没有视力，眼睛不能跟随物体移动</el-radio>
                  <el-radio :label="3" v-if="perception.visionScore==3">辨认物体有困难，但眼睛能跟随物体移动，只能看到光、颜色和形状</el-radio>
                  <el-radio :label="2" v-if="perception.visionScore==2">视力有限，看不清报纸大标题，但能辨认物体</el-radio>
                  <el-radio :label="1" v-if="perception.visionScore==1">能看清楚大字体，但看不清书报上的标准字体</el-radio>
                  <el-radio :label="0" v-if="perception.visionScore==0">能看清书报上的标准字体</el-radio>
                </el-radio-group></div>

            </td>
          </tr>
          <tr>
            <td class="ttitle " >听力</td>
            <td class="ttitle  " colspan="3">
              <div class="tips " style="line-height: 45px; ">
                <el-radio-group v-model="perception.hearingScore"  >
                  <el-radio :label="4" v-if="perception.hearingScore==4">完全听不见</el-radio>
                  <el-radio :label="3" v-if="perception.hearingScore==3">讲话者大声说话或说话很慢，才能部分听见</el-radio>
                  <el-radio :label="2" v-if="perception.hearingScore==2">正常交流有些困难，需在安静的环静或大声说话才能听到</el-radio>
                  <el-radio :label="1" v-if="perception.hearingScore==1">在轻声说话或说话距离超过2米时听不清</el-radio>
                  <el-radio :label="0" v-if="perception.hearingScore==0">可正常交谈，能听到电视、电话、门铃的声音</el-radio>
                </el-radio-group></div>

            </td>
          </tr>
          <tr>
            <td class="ttitle " >沟通交流</td>
            <td class="ttitle  " colspan="3">
              <div class="tips " style="line-height: 45px; ">
                <el-radio-group v-model="perception.communicationScore"  >
                  <el-radio :label="3" v-if="perception.communicationScore==3">不能表达需要或理解他人的话</el-radio>
                  <el-radio :label="2" v-if="perception.communicationScore==2">>表达需要或理解有困难，需频繁重复或简化口头表达</el-radio>
                  <el-radio :label="1" v-if="perception.communicationScore==1">能够表达自己的需要及理解别人的话，但需要增加时间或给予帮助</el-radio>
                  <el-radio :label="0" v-if="perception.communicationScore==0">无困难，能与他人正常沟通和交流</el-radio>
                </el-radio-group></div>

            </td>
          </tr>
          <tr>
            <td class="ttitle " >感知觉与沟通分级</td>
            <td class="ttitle  " colspan="3">
              <div class="tips " style="line-height: 45px; ">
                <el-radio-group v-model="perception.grade" >
                  <el-radio :label="0" v-if="perception.grade==0"> 能力完好：意识清醒，且视力和听力评为0或1，沟通评为0
                  </el-radio>
                  <el-radio :label="1" v-if="perception.grade==1"> 轻度受损：意识清醒，但视力或听力中至少一项评为2，或沟通评为1
                  </el-radio>
                  <el-radio :label="2" v-if="perception.grade==2"> 中度受损：意识清醒，但视力或听力中至少一项评为3，或沟通评为2
                  </el-radio>
                  <el-radio :label="3" v-if="perception.grade==3"> 重度受损：意识清醒或嗜睡，但视力或听力中至少一项评为4，或沟通评为3；或昏睡/昏迷</el-radio>
                </el-radio-group>
              </div>

            </td>
          </tr>



        </table>
      </div>
      <div style="page-break-after:always">
        <h3 style="text-align: center;">社会参与评估</h3>
        <table style="width: 100%" class="mytable" >

          <tr>
            <td class="ttitle seal">姓名</td>
            <td class="datalist"  >{{from.elderlyName}}</td>
            <td class="ttitle seal">评估日期</td>
            <td class="datalist seal" > {{form.evaluationDate | parseTime('{y}-{m}-{d}')}}</td>


          </tr>

          <tr>
            <td class="ttitle seal">评估类别</td>
            <td class="datalist seal"  >
              {{form.evaluationTypeName}}
            </td>

            <td class="ttitle seal">评估员</td>
            <td class="datalist seal" >{{form.evaluationor}}</td>
          </tr>
          <tr>

            <td class="ttitle seal">住址</td>
            <td class="datalist seal" colspan="3" > <el-cascader
              size="large"

              style="text-align: center;border: 0"

              class="disabled"
              :options="provinceAndCity"
              v-model="selectedOption"
            >
            </el-cascader>
              <span style="font-size: 14px;">/ {{from.liveAdress.xxaddress}}</span></td>

          </tr>



          <tr>
            <td class="ttitle " colspan="4">社会参与评估</td>
          </tr>
          <tr>
            <td class="ttitle " >生活能力</td>
            <td class="ttitle " colspan="3">
              <div class="tips " style="line-height: 45px; ">
                <el-radio-group v-model="society.survivalSkillsScore"  >
                  <el-radio :label="4"  v-if="society.survivalSkillsScore==4">个人基本生活事务（如饮食、二便）需要部分帮助或完全依赖他人帮助

                  </el-radio>
                  <el-radio :label="3" v-if="society.survivalSkillsScore==3">个人基本生活事务能自理（如饮食、二便），在督促下可洗漱

                  </el-radio>
                  <el-radio :label="2" v-if="society.survivalSkillsScore==2">个人生活能自理；只有在他人帮助下才能做些家务，但质量不好

                  </el-radio>
                  <el-radio :label="1" v-if="society.survivalSkillsScore==1">除个人生活自理外，只能做简单的家务（如洗碗、叠被、整理衣物等），家庭事务安排欠条理。</el-radio>
                  <el-radio :label="0" v-if="society.survivalSkillsScore==0">除个人生活自理外（如饮食、洗漱、穿戴、二便），能料理家务<div  class="tips" style="margin-left: 65px">（如做饭、洗衣、擦玻璃、铺床等）或当家管理事务 （如钱财管理）。</div></el-radio>
                </el-radio-group></div>

            </td>
          </tr>
          <tr>
            <td class="ttitle " >工作能力</td>
            <td class="ttitle " colspan="3">
              <div class="tips " style="line-height: 45px; ">
                <el-radio-group v-model="society.abilityToWorkScore"  >
                  <el-radio :label="4" v-if="society.abilityToWorkScore==4">对以往的知识或技能全部磨灭</el-radio>
                  <el-radio :label="3" v-if="society.abilityToWorkScore==3">对熟练工作只有一些片段保留，技能全部遗忘</el-radio>
                  <el-radio :label="2" v-if="society.abilityToWorkScore==2">原来熟练的脑力工作或体力技巧性工作明显不如以往，部分遗忘</el-radio>
                  <el-radio :label="1" v-if="society.abilityToWorkScore==1">原来熟练的脑力工作或体力技巧性工作能力有所下降</el-radio>
                  <el-radio :label="0" v-if="society.abilityToWorkScore==0">原来熟练的脑力工作或体力技巧性工作可照常进行</el-radio>
                </el-radio-group></div>

            </td>
          </tr>
          <tr>
            <td class="ttitle " >时间/空间定向</td>
            <td class="ttitle " colspan="3">
              <div class="tips " style="line-height: 45px; ">
                <el-radio-group v-model="society.spatialOrientationScore"  >
                  <el-radio :label="4" v-if="society.spatialOrientationScore==4">无时间观念；不能单独外出</el-radio>
                  <el-radio :label="3" v-if="society.spatialOrientationScore==3">时间观念很差，年、月、日不清楚，可知上午或下午；只能在左邻右舍间串门，
                    <div  class="tips" style="margin-left: 65px">对现住地不知名称和方位</div></el-radio>
                  <el-radio :label="2" v-if="society.spatialOrientationScore==2">时间观念较差，年、月、日不清楚，可知上半年或下半年；只能单独在家附近行动，
                    <div  class="tips" style="margin-left: 65px">对现住地只知名称，不知道方位</div></el-radio>
                  <el-radio :label="1" v-if="society.spatialOrientationScore==1">时间观念有些下降，年、月、日清楚，但有时相差几天；可单独来往于近街，
                    <div  class="tips" style="margin-left: 65px">知道现住地的名称和方位，但不知回家路线</div></el-radio>
                  <el-radio :label="0" v-if="society.spatialOrientationScore==0">时间观念（年、月、日、时）清楚；可单独出远门，可自行熟练使用大众交通工具
                    <div  class="tips" style="margin-left: 65px">（乘坐火车、公交、地铁等）、能很快掌握新环境的方位</div>  </el-radio>
                </el-radio-group></div>

            </td>
          </tr>
          <tr>
            <td class="ttitle " >人物定向</td>
            <td class="ttitle " colspan="3">
              <div class="tips " style="line-height: 45px; ">
                <el-radio-group v-model="society.characterOrientationScore"  >
                  <el-radio :label="4" v-if="society.characterOrientationScore==4">不辨熟人和生人</el-radio>
                  <el-radio :label="3" v-if="society.characterOrientationScore==3">只认识常同住的亲人和经常接触的服务人员，可称呼子女或孙子女，可辨熟人和生人</el-radio>
                  <el-radio :label="2" v-if="society.characterOrientationScore==2">能称呼家中人，或只能照样称呼，不知其关系，不辨辈分</el-radio>
                  <el-radio :label="1" v-if="society.characterOrientationScore==1">知道家中近亲的关系，可识别经常接触的服务人员（医务人员、社工、护理员等），
                    <div  class="tips" style="margin-left: 65px">不会分辨陌生人的大致年龄，不能称呼陌生人</div> </el-radio>
                  <el-radio :label="0" v-if="society.characterOrientationScore==0">知道周围人们的关系，知道常见人物称谓的意义(如祖孙、叔伯、姑姨、婆媳等)；
                    <div  class="tips" style="margin-left: 65px">可分辨陌生人的大致年龄和身份，可用适当称呼</div></el-radio>
                </el-radio-group></div>

            </td>
          </tr>
          <tr>
            <td class="ttitle " >社会交往能力</td>
            <td class="ttitle " colspan="3">
              <div class="tips " style="line-height: 45px; ">
                <el-radio-group v-model="society.socialSkillsScore"  @change="checkChangesociety">
                  <el-radio :label="4" v-if="society.socialSkillsScore==4">难以与人接触</el-radio>
                  <el-radio :label="3" v-if="society.socialSkillsScore==3">勉强可与人交往，谈吐内容不清楚，表情不恰当</el-radio>
                  <el-radio :label="2" v-if="society.socialSkillsScore==2">脱离社会，可被动接触，不会主动待人，谈话中很多不适词句，容易上当受骗</el-radio>
                  <el-radio :label="1" v-if="society.socialSkillsScore==1">能适应单纯环境（如社区日间照料中心、养老机构内环境等），主动接触人，
                    <div  class="tips" style="margin-left: 65px">初见面时难让人发现智力问题，不能理解隐喻语</div></el-radio>

                  <el-radio :label="0"><span>0分</span>参与社会，在社会环境有一定的适应能力，待人接物恰当</el-radio>
                </el-radio-group></div>

            </td>
          </tr>
          <tr>
            <td class="ttitle " >社会参与总分</td>
            <td class="ttitle " colspan="3">
              <div class="tips " style="line-height: 45px; ">{{societyfraction}}分</div>

            </td>
          </tr>
          <tr>
            <td class="ttitle " >社会参与分级</td>
            <td class="ttitle " colspan="3">
              <div class="tips " style="line-height: 45px; ">
                <el-radio-group v-model="society.grade" >
                  <el-radio :label="0" v-if="society.grade==0"> 能力完好：总分0-2分</el-radio>
                  <el-radio :label="1" v-if="society.grade==1"> 轻度受损：总分3-7分</el-radio>
                  <el-radio :label="2" v-if="society.grade==2"> 中度受损：总分8-13分</el-radio>
                  <el-radio :label="3" v-if="society.grade==3"> 重度受损：总分14-20分</el-radio>
                </el-radio-group></div>

            </td>
          </tr>


        </table>
      </div>
      <div style="page-break-after:always">
        <h3 style="text-align: center;">评估报告</h3>
        <table style="width: 100%" class="mytable" >

          <tr>
            <td class="ttitle seal">姓名</td>
            <td class="datalist"  >{{from.elderlyName}}</td>
            <td class="ttitle seal">评估日期</td>
            <td class="datalist seal" > {{form.evaluationDate | parseTime('{y}-{m}-{d}')}}</td>


          </tr>

          <tr>
            <td class="ttitle seal">评估类别</td>
            <td class="datalist seal"  >
              {{form.evaluationTypeName}}
            </td>

            <td class="ttitle seal">评估员</td>
            <td class="datalist seal" >{{form.evaluationor}}</td>
          </tr>
          <tr>

            <td class="ttitle seal">住址</td>
            <td class="datalist seal" colspan="3" > <el-cascader
              size="large"

              style="text-align: center;border: 0"

              class="disabled"
              :options="provinceAndCity"
              v-model="selectedOption"
            >
            </el-cascader>
              <span style="font-size: 14px;">/ {{from.liveAdress.xxaddress}}</span></td>

          </tr>



          <tr>
            <td class="ttitle " colspan="4">评估报告</td>
          </tr>
          <tr>
            <td class="ttitle " >一级指标分级</td>
            <td class="ttitle " colspan="3">
              <div class="tips " style="line-height: 45px; ">
                <span style="margin-left: 10px">1.日常生活活动  {{ability.adAssessmentGrade}} 级</span>
                <span style="margin-left: 10px">2.精神状态 {{ability.msAssessmentGrade	}} 级</span>
                <span style="margin-left: 10px">3.感知觉与沟通 {{ability.pcAssessmentGrade}} 级</span>
                <span  style="margin-left: 10px">4.社会参与 {{ability.spAssessmentGrade	}} 级</span>
              </div>

            </td>
          </tr>
          <tr>
            <td class="ttitle " >老年人能力初步等级</td>
            <td class="ttitle " colspan="3">
              <div class="tips " style="line-height: 45px; ">
                <el-radio-group v-model="ability.abilityInitialLevel" >
                  <el-radio :label="3"  v-if="ability.abilityInitialLevel==3"><span class="right"> 重度失能</span></el-radio>
                  <el-radio :label="2" v-if="ability.abilityInitialLevel==2"><span> 中度失能</span></el-radio>
                  <el-radio :label="1" v-if="ability.abilityInitialLevel==1"><span> 轻度失能</span></el-radio>
                  <el-radio :label="0" v-if="ability.abilityInitialLevel==0"><span> 能力完好</span></el-radio>
                </el-radio-group></div>

            </td>
          </tr>
          <tr>
            <td class="ttitle " >等级变更条款</td>
            <td class="ttitle " colspan="3">
              <div class="tips " style="line-height: 45px; " v-if="ability.changeClause">
                <el-radio-group   v-model="ability.changeClause[0]" >
                  <el-radio :label="1" v-if="ability.changeClause[0]==1"><span class="right">1 有认知障碍/痴呆、精神疾病者，在原有能力级别上提高一个等级；
</span></el-radio>
                  <el-radio :label="2" v-if="ability.changeClause[0]==2"><span>2 近30天内发生过2次及以上跌倒、噎食、自杀、走失者，在原有能力级别上提高一个等级；</span></el-radio>
                  <el-radio :label="3" v-if="ability.changeClause[0]==3"><span>3 处于昏迷状态者，直接评定为重度失能；</span></el-radio>

                </el-radio-group></div>
              <div v-if="ability.abilityInitialLevel==3">
                若初步等级确定为“3重度失能”，则不考虑上述1-3中各情况对最终等级的影响，等级不再提高
              </div>
            </td>
          </tr>
          <tr>
            <td class="ttitle " >老年人能力最终等级</td>
            <td class="ttitle " colspan="3">
              <div class="tips " style="line-height: 45px; ">
                <el-radio-group v-model="ability.abilityFinalLevel">
                  <el-radio :label="3" v-if="ability.abilityFinalLevel==3" ><span class="right"> 重度失能
</span></el-radio>
                  <el-radio :label="2" v-if="ability.abilityFinalLevel==2"><span> 中度失能</span></el-radio>
                  <el-radio :label="1" v-if="ability.abilityFinalLevel==1"><span> 轻度失能</span></el-radio>
                  <el-radio :label="0" v-if="ability.abilityFinalLevel==0"><span> 能力完好</span></el-radio>
                </el-radio-group></div>

            </td>
          </tr>
          <tr>
            <td class="ttitle " >评估标准</td>
            <td class="ttitle " colspan="3">
              <div  style="line-height: 35px; text-align: left">
                <div  style="text-align: left;padding-left: 10px;"><div>注：老年人能力初步等级划分标准</div></div>

                <div  style="text-align: left;padding-left: 10px;"><div><span style="color: #333333;font-size: 14px;font-weight: bold">0 能力完好</span></div></div>
                <div  style="text-align: left;padding-left: 10px;"><div>日常生活活动、精神状态、感知觉与沟通分级均为0，社会参与分级为0或1</div></div>

                <div  style="text-align: left;padding-left: 10px;"><div><span style="color: #333333;font-size: 14px;font-weight: bold">1 轻度失能</span></div></div>
                <div style="text-align: left;padding-left: 10px;" >
                  <div>
                    日常生活活动分级为0，但精神状态、感知觉与沟通中至少一项分级为1及以上，或社会参与的分级为2；
                  </div>
                  <div style="text-align: left;">
                    或日常生活活动分级为1，精神状态、感知觉与沟通、社会参与中至少有一项的分级为0或1
                  </div>
                  <div  style="text-align: left;"><div><span style="color: #333333;font-size: 14px;font-weight: bold">2 中度失能</span></div></div>
                  <div  style="text-align: left;padding-left: 10px;">
                    日常生活活动分级为1，但精神状态、感知觉与沟通、社会参与均为2，或有一项为3；
                  </div>
                  <div  style="text-align: left;">
                    或日常生活活动分级为2，且精神状态、感知觉与沟通、社会参与中有1-2项的分级为1或2
                  </div>
                  <div  style="text-align: left;"><div><span style="color: #333333;font-size: 14px;font-weight: bold">3 重度失能</span></div></div>
                  <div  style="text-align: left;">
                    日常生活活动的分级为3；
                  </div>
                  <div  style="text-align: left ">
                    或日常生活活动、精神状态、感知觉与沟通、社会参与分级均为2；
                  </div>
                  <div style="text-align: left;">
                    或日常生活活动分级为2，且精神状态、感知觉与沟通、社会参与中至少有一项分级为3
                  </div>
                </div>


              </div>

            </td>

          </tr>



        </table>
      </div>

    </div>
    <el-dialog
      title="评估详情"
      :visible.sync="assessmentRecordsVisibles"
      width="900px"
      @close='closeDialo'
    >
      <template>

        <el-tabs tab-position="left" style="height: 100%" v-model="activeName" @tab-click="tabclick">
          <el-tab-pane label="评估信息" name="first">
            <el-form ref="form" :model="form"    label-width="100px"class="form"  >



              <el-form-item label="姓名" >
                <!--                            <el-input v-model="form.elderlyName" style="width:100%" ></el-input>-->
                <span>{{from.elderlyName}}</span>
              </el-form-item>
              <el-form-item label="住址"   class="margin">
                <el-cascader
                  class="basicarchives"
                  size="large"
                  style="width: 100%"
                  :disabled="true"
                  :options="provinceAndCity"
                  v-model="selectedOption"
                >
                </el-cascader>



              </el-form-item>
              <el-form-item label="详细地址"  >
                <span>{{from.liveAdress.xxaddress}}</span>
              </el-form-item>
              <el-form-item label="评估日期" >

                <template>
                  {{form.evaluationDate | parseTime('{y}-{m}-{d}')}}
                </template>

              </el-form-item>
              <el-form-item label="评估类别" prop="evaluationTypeName">

                     {{form.evaluationTypeName}}



              </el-form-item>
              <el-form-item label="评估员" prop="evaluationor">

                <div>
                  {{form.evaluationor}}
                </div>

              </el-form-item>

            </el-form >
          </el-tab-pane >
          <el-tab-pane label="日常生活活动评估" name="second">

                  <h4>
              一. 日常生活活动评估
            </h4>
            <el-form class="assessmentform" ref="assessmentform" :model="assessmentform" :rules="planRules" label-width="120px" label-position="top" style="margin-bottom: 50px">

              <el-form-item label="进食" prop="eatScore" key="15">
                <div class="tips"><div>说明：指用餐具将食物由容器送到口中、咀嚼、吞咽等过程</div></div>
                <el-radio-group v-model="assessmentform.eatScore" @change="checkChange">
                  <el-radio :label="10" ><span class="right">10分</span>可独立进食（在合理的时间内独立进食准备好的食物）</el-radio>
                  <el-radio :label="5"><span>5分</span>需部分帮助（在进食过程中需要一定的帮助，如协助把持餐具）</el-radio>
                  <el-radio :label="0"><span>0分</span>需极大帮助或完全依赖他人，或有留置营养</el-radio>
                </el-radio-group>
              </el-form-item>
              <el-form-item label="洗澡" prop="laveScore" key="16">
                <el-radio-group v-model="assessmentform.laveScore" @change="checkChange">
                  <el-radio :label="5"><span>5分</span>准备好洗澡水后，可独立完成洗澡过程</el-radio>
                  <el-radio :label="0"><span>0分</span>在洗澡过程中需要他人帮助</el-radio>
                </el-radio-group>
              </el-form-item>
              <el-form-item label="修饰" prop="decorateScore" key="17">
                <div class="tips"><div>说明：指洗脸、刷牙、梳头、刮脸等</div></div>
                <el-radio-group v-model="assessmentform.decorateScore" @change="checkChange">

                  <el-radio :label="5"><span>5分</span>可独立完成</el-radio>
                  <el-radio :label="0"><span>0分</span>需要他人帮助</el-radio>
                </el-radio-group>
              </el-form-item>
              <el-form-item label="穿衣" prop="gardScore" key="18">
                <div class="tips"><div>说明：指穿衣脱衣、系扣、拉拉链、穿脱鞋袜、系鞋带等</div></div>
                <el-radio-group v-model="assessmentform.gardScore" @change="checkChange">
                  <el-radio :label="10"><span class="right">10分</span>可独立完成</el-radio>
                  <el-radio :label="5"><span>5分</span>需要部分帮助（能自己穿脱，但需要他人帮助整理自己的衣物、系鞋带、拉拉链）</el-radio>
                  <el-radio :label="0"><span>0分</span>需极大的帮助或完全依赖他人</el-radio>
                </el-radio-group>
              </el-form-item>
              <el-form-item label="大便控制" prop="stoolScore" key="19">

                <el-radio-group v-model="assessmentform.stoolScore" @change="checkChange">
                  <el-radio :label="10"><span class="right" >10分</span>可控制大便</el-radio>
                  <el-radio :label="5"><span>5分</span>偶尔失控（每周<1次），或需要他人提示</el-radio>
                  <el-radio :label="0"><span>0分</span>完全失控</el-radio>
                </el-radio-group>
              </el-form-item>
              <el-form-item label="小便控制" prop="urineScore" key="20">

                <el-radio-group v-model="assessmentform.urineScore" @change="checkChange">
                  <el-radio :label="10"><span class="right">10分</span>可控制小便</el-radio>
                  <el-radio :label="5"><span>5分</span>偶尔失控（每周<1次），或需要他人提示</el-radio>
                  <el-radio :label="0"><span>0分</span>完全失控</el-radio>
                </el-radio-group>
              </el-form-item>
              <el-form-item label="如厕" prop="goToiletScore" key="21">
                <div class="tips"><div>说明：包括去厕所、解开衣裤、擦净、整理衣裤、冲水等</div></div>
                <el-radio-group v-model="assessmentform.goToiletScore" @change="checkChange">
                  <el-radio :label="10"><span class="right">10分</span>可独立完成</el-radio>
                  <el-radio :label="5"><span>5分</span>需部分帮助（需他人搀扶去厕所、需他人帮忙冲水或整理衣裤等）</el-radio>
                  <el-radio :label="0"><span>0分</span>需极大帮助或完全依赖他人</el-radio>
                </el-radio-group>
              </el-form-item>
              <el-form-item label="床椅转移" prop="bedChairTransferScore" key="22">
                <div class="tips"><div>说明：包括去厕所、解开衣裤、擦净、整理衣裤、冲水等</div></div>
                <el-radio-group v-model="assessmentform.bedChairTransferScore" @change="checkChange">
                  <el-radio :label="15"><span class="right">15分</span>可独立完成</el-radio>
                  <el-radio :label="10"><span class="right">10分</span>需部分帮助（需他人搀扶或使用拐杖）</el-radio>
                  <el-radio :label="5"><span>5分</span>需极大帮助（较大程度上依赖他人搀扶和帮助）</el-radio>
                  <el-radio :label="0"><span>0分</span>完全依赖他人</el-radio>
                </el-radio-group>
              </el-form-item>
              <el-form-item label="平地行走" prop="walkingOnFlatGroundScore" key="23">
                <el-radio-group v-model="assessmentform.walkingOnFlatGroundScore" @change="checkChange">
                  <el-radio :label="15"><span class="right">15分</span>可独立在平地上行走45m</el-radio>
                  <el-radio :label="10"><span class="right">10分</span>需部分帮助（因肢体残疾、平衡能力差、过度衰弱、视力等问题，在一定程度上
                    <div  class="tips" style="margin-left: 65px">需他人地搀扶或使用拐杖、助行器等辅助用具）</div></el-radio>
                  <el-radio :label="5"><span>5分</span>需极大帮助（因肢体残疾、平衡能力差、过度衰弱、视力等问题，
                    <div  class="tips" style="margin-left: 65px">在较大程度上依赖他人搀扶，或坐在轮椅上自行移动）</div></el-radio>
                  <el-radio :label="0"><span>0分</span>完全依赖他人</el-radio>
                </el-radio-group>
              </el-form-item>
              <el-form-item label="上下楼梯" prop="downStairsScore" key="24">
                <el-radio-group v-model="assessmentform.downStairsScore" @change="checkChange">
                  <el-radio :label="10"><span class="right">10分</span>可独立上下楼梯（连续上下10-15个台阶）</el-radio>
                  <el-radio :label="5"><span>5分</span>需部分帮助（需他人搀扶，或扶着楼梯、使用拐杖等）</el-radio>
                  <el-radio :label="0"><span>0分</span>需极大帮助或完全依赖他人</el-radio>
                </el-radio-group>
              </el-form-item>
              <el-form-item label="日常生活活动总分" >
                <div class="tips"  ><div>{{fraction}}分</div></div>
              </el-form-item>
              <el-form-item label="日常生活活动分级"  prop="grade" @change="checkChange">
                <el-radio-group v-model="assessmentform.grade" :disabled="true">
                  <el-radio :label="0">0 能力完好：总分100分</el-radio>
                  <el-radio :label="1">1 轻度受损：总分65-95分</el-radio>
                  <el-radio :label="2">2 中度受损：总分45-60分</el-radio>
                  <el-radio :label="3">3 重度受损：总分≤40分</el-radio>
                </el-radio-group>
              </el-form-item>
            </el-form>
            <el-button @click="revise()" style="float: right" type="primary" v-if="this.status==false">
              保存修改
            </el-button >
          </el-tab-pane>
          <el-tab-pane label="精神状态评估" name="third">
            <h4>
              二.精神状态评估表
            </h4>

            <el-form class="assessmentform"  ref="spirit" :model="spirit"  :rules="spiritRules" label-width="120px" label-position="top" style="margin-bottom: 50px">

              <el-form-item label="认知功能" prop="cognitiveAbilityScore" key="25">
                <div class="tips"><div>“我说三样东西，请重复一遍，并记住，一会儿会问您”：苹果、手表、国旗</div></div>
                <div class="tips"><div>（1）画钟实验：“请您在这儿画一个圆形的时钟，在时钟上标出10点45分”</div></div>
                <div class="tips"><div>（2）回忆词语：“现在请您告诉我，刚才我要您记住的三样东西是什么？”
                </div>
                </div>
                <div class="tips"><div>评分</div></div>
                <el-radio-group v-model="spirit.cognitiveAbilityScore"  @change="checkChangespirit">
                  <el-radio :label="2"><span>2分</span>已确诊为认知障碍，如老年痴呆</el-radio>
                  <el-radio :label="1"><span>1分</span>画钟错误（画的圆不闭锁，或指针位置不准确），或只回忆出0-1个词</el-radio>
                  <el-radio :label="0"><span>0分</span>画钟正确（画出一个闭锁圆，指针位置准确），且能回忆出2-3个词</el-radio>
                </el-radio-group>

              </el-form-item>
              <el-form-item label="攻击行为" prop="aggressiveBehaviorScore" key="26">
                <el-radio-group v-model="spirit.aggressiveBehaviorScore"  @change="checkChangespirit">
                  <el-radio :label="2"><span>2分</span>每周有几次身体攻击行为，或每日有语言攻击行为</el-radio>
                  <el-radio :label="1"><span>1分</span>每月有几次身体攻击行为，或每周有几次语言攻击行为</el-radio>
                  <el-radio :label="0"><span>0分</span>无身体攻击行为（如打/踢/推/咬/抓/摔东西）和语言攻击行为（如骂人、语言威胁、尖叫）</el-radio>
                </el-radio-group>
              </el-form-item>
              <el-form-item label="抑郁症状" prop="depressionSymptomsScore" key="27">
                <el-radio-group v-model="spirit.depressionSymptomsScore"  @change="checkChangespirit">
                  <el-radio :label="2"><span>2分</span>有自杀念头或自杀行为</el-radio>
                  <el-radio :label="1"><span>1分</span>情绪低落、不爱说话、不爱梳洗、不爱活动</el-radio>
                  <el-radio :label="0"><span>0分</span>无</el-radio>
                </el-radio-group>
              </el-form-item>
              <el-form-item label="精神状态总分" >
                <div class="tips" ><div>{{spiritfraction}}分</div></div>
              </el-form-item>
              <el-form-item label="精神状态分级"  prop="grade" @change="checkChangespirit">
                <el-radio-group v-model="spirit.grade" :disabled="true">
                  <el-radio :label="0">0 能力完好：总分0分</el-radio>
                  <el-radio :label="1">1 轻度受损：总分1分</el-radio>
                  <el-radio :label="2">2 中度受损：总分2-3分</el-radio>
                  <el-radio :label="3">3 重度受损：总分4-6分</el-radio>
                </el-radio-group>
              </el-form-item>
              <el-button style="float: right" @click="revisespirit()" type="primary" v-if="this.status==false">
                保存修改
              </el-button>
            </el-form>

          </el-tab-pane>
          <el-tab-pane label="感知觉与沟通评估" name="fourth">
            <h4>
              三.感知觉与沟通评估表
            </h4>

            <el-form class="assessmentform" ref="perception" :model="perception" :rules="perceptionRules" label-width="120px" label-position="top" style="margin-bottom: 50px">

              <el-form-item label="意识水平" prop="levelOfConsciousnessScore" >

                <el-radio-group v-model="perception.levelOfConsciousnessScore"  @change="checkChangeperception">
                  <el-radio :label="3" ><span>3分</span>昏迷，处于浅昏迷时对疼痛刺激有回避和痛苦表情；处于深昏迷时对刺激无反应
                    <div  class="tips" style="margin-left: 55px">（若评定为昏迷，直接评定为重度失能，可不进行以下项目的评估）</div>
                  </el-radio>
                  <el-radio :label="2"><span>2分</span>昏睡，一般的外界刺激不能使其觉醒，给予较强烈的刺激时可有短时的意识清醒，
                    <div  class="tips" style="margin-left: 65px">醒后可简短回答提问当刺激减弱后又很快进入睡眠状态</div>
                  </el-radio>
                  <el-radio :label="1"><span>1分</span>嗜睡，表现为睡眠状态过度延长。当呼唤或推动其肢体时可唤醒，并能进行正确的交谈或执行指令，停止刺激后又继续入睡</el-radio>
                  <el-radio :label="0"><span>0分</span>神志清醒，对周围环境警觉</el-radio>
                </el-radio-group>

              </el-form-item>
              <el-form-item label="视力" prop="visionScore">
                <div class="tips"><div>说明:若平日带老花镜或近视镜，应在佩戴眼镜的情况下评估

                </div></div>
                <el-radio-group v-model="perception.visionScore"  @change="checkChangeperception">
                  <el-radio :label="4"><span>4分</span>没有视力，眼睛不能跟随物体移动</el-radio>
                  <el-radio :label="3"><span>3分</span>辨认物体有困难，但眼睛能跟随物体移动，只能看到光、颜色和形状</el-radio>
                  <el-radio :label="2"><span>2分</span>视力有限，看不清报纸大标题，但能辨认物体</el-radio>
                  <el-radio :label="1"><span>1分</span>能看清楚大字体，但看不清书报上的标准字体</el-radio>
                  <el-radio :label="0"><span>0分</span>能看清书报上的标准字体</el-radio>
                </el-radio-group>
              </el-form-item>
              <el-form-item label="听力" prop="hearingScore">
                <div class="tips"><div>说明:若平时佩戴助听器，应在佩戴助听器的情况下评估
                </div></div>
                <el-radio-group v-model="perception.hearingScore"  @change="checkChangeperception">
                  <el-radio :label="4"><span>4分</span>完全听不见</el-radio>
                  <el-radio :label="3"><span>3分</span>讲话者大声说话或说话很慢，才能部分听见</el-radio>
                  <el-radio :label="2"><span>2分</span>正常交流有些困难，需在安静的环静或大声说话才能听到</el-radio>
                  <el-radio :label="1"><span>1分</span>在轻声说话或说话距离超过2米时听不清</el-radio>
                  <el-radio :label="0"><span>0分</span>可正常交谈，能听到电视、电话、门铃的声音</el-radio>
                </el-radio-group>
              </el-form-item>
              <el-form-item label="沟通交流" prop="communicationScore">
                <div class="tips"><div>说明:包括非语言沟通

                </div></div>
                <el-radio-group v-model="perception.communicationScore"  @change="checkChangeperception">
                  <el-radio :label="3"><span>3分</span>不能表达需要或理解他人的话</el-radio>
                  <el-radio :label="2"><span>2分</span>表达需要或理解有困难，需频繁重复或简化口头表达</el-radio>
                  <el-radio :label="1"><span>1分</span>能够表达自己的需要及理解别人的话，但需要增加时间或给予帮助</el-radio>
                  <el-radio :label="0"><span>0分</span>无困难，能与他人正常沟通和交流</el-radio>
                </el-radio-group>
              </el-form-item>

              <el-form-item label="感知觉与沟通分级"  prop="grade" @change="checkChangeperception">
                <el-radio-group v-model="perception.grade" :disabled="true">
                  <el-radio :label="0">0 能力完好：意识清醒，且视力和听力评为0或1，沟通评为0
                  </el-radio>
                  <el-radio :label="1">1 轻度受损：意识清醒，但视力或听力中至少一项评为2，或沟通评为1
                  </el-radio>
                  <el-radio :label="2">2 中度受损：意识清醒，但视力或听力中至少一项评为3，或沟通评为2
                  </el-radio>
                  <el-radio :label="3">3 重度受损：意识清醒或嗜睡，但视力或听力中至少一项评为4，或沟通评为3；或昏睡/昏迷</el-radio>
                </el-radio-group>
              </el-form-item>

            </el-form>
            <el-button style="float: right" @click="reviseperception()" type="primary" v-if="this.status==false">
              保存修改
            </el-button>

          </el-tab-pane>
          <el-tab-pane label="社会参与评估" name="five">
            <h4>
              四.社会参与评估表
            </h4>

            <el-form class="assessmentform" ref="society" :rules="societyRules" :model="society"  label-width="120px" label-position="top" style="margin-bottom: 50px">

              <el-form-item label="生活能力" prop="survivalSkillsScore" >

                <el-radio-group v-model="society.survivalSkillsScore"  @change="checkChangesociety">
                  <el-radio :label="4" ><span>4分</span>个人基本生活事务（如饮食、二便）需要部分帮助或完全依赖他人帮助

                  </el-radio>
                  <el-radio :label="3" ><span>3分</span>个人基本生活事务能自理（如饮食、二便），在督促下可洗漱

                  </el-radio>
                  <el-radio :label="2"><span>2分</span>个人生活能自理；只有在他人帮助下才能做些家务，但质量不好

                  </el-radio>
                  <el-radio :label="1"><span>1分</span>除个人生活自理外，只能做简单的家务（如洗碗、叠被、整理衣物等），家庭事务安排欠条理。</el-radio>
                  <el-radio :label="0"><span>0分</span>除个人生活自理外（如饮食、洗漱、穿戴、二便），能料理家务（如做饭、洗衣、擦玻璃、铺床等）或当家管理事务 <div  class="tips" style="margin-left: 65px">（如钱财管理）。</div></el-radio>
                </el-radio-group>

              </el-form-item>
              <el-form-item label="工作能力" prop="abilityToWorkScore">
                <el-radio-group v-model="society.abilityToWorkScore"  @change="checkChangesociety">
                  <el-radio :label="4"><span>4分</span>对以往的知识或技能全部磨灭</el-radio>
                  <el-radio :label="3"><span>3分</span>对熟练工作只有一些片段保留，技能全部遗忘</el-radio>
                  <el-radio :label="2"><span>2分</span>原来熟练的脑力工作或体力技巧性工作明显不如以往，部分遗忘</el-radio>
                  <el-radio :label="1"><span>1分</span>原来熟练的脑力工作或体力技巧性工作能力有所下降</el-radio>
                  <el-radio :label="0"><span>0分</span>原来熟练的脑力工作或体力技巧性工作可照常进行</el-radio>
                </el-radio-group>
              </el-form-item>
              <el-form-item label="时间/空间定向" prop="spatialOrientationScore">
                <el-radio-group v-model="society.spatialOrientationScore"  @change="checkChangesociety">
                  <el-radio :label="4"><span>4分</span>无时间观念；不能单独外出</el-radio>
                  <el-radio :label="3"><span>3分</span>时间观念很差，年、月、日不清楚，可知上午或下午；只能在左邻右舍间串门，
                    <div  class="tips" style="margin-left: 65px">对现住地不知名称和方位</div></el-radio>
                  <el-radio :label="2"><span>2分</span>时间观念较差，年、月、日不清楚，可知上半年或下半年；只能单独在家附近行动，
                    <div  class="tips" style="margin-left: 65px">对现住地只知名称，不知道方位</div></el-radio>
                  <el-radio :label="1"><span>1分</span>时间观念有些下降，年、月、日清楚，但有时相差几天；可单独来往于近街，
                    <div  class="tips" style="margin-left: 65px">知道现住地的名称和方位，但不知回家路线</div></el-radio>
                  <el-radio :label="0"><span>0分</span>时间观念（年、月、日、时）清楚；可单独出远门，可自行熟练使用大众交通工具
                    <div  class="tips" style="margin-left: 65px">（乘坐火车、公交、地铁等）、能很快掌握新环境的方位</div>  </el-radio>
                </el-radio-group>
              </el-form-item>
              <el-form-item label="人物定向" prop="characterOrientationScore">
                <el-radio-group v-model="society.characterOrientationScore"  @change="checkChangesociety">
                  <el-radio :label="4"><span>4分</span>不辨熟人和生人</el-radio>
                  <el-radio :label="3"><span>3分</span>只认识常同住的亲人和经常接触的服务人员，可称呼子女或孙子女，可辨熟人和生人</el-radio>
                  <el-radio :label="2"><span>2分</span>能称呼家中人，或只能照样称呼，不知其关系，不辨辈分</el-radio>
                  <el-radio :label="1"><span>1分</span>知道家中近亲的关系，可识别经常接触的服务人员（医务人员、社工、护理员等），
                    <div  class="tips" style="margin-left: 65px">不会分辨陌生人的大致年龄，不能称呼陌生人</div> </el-radio>
                  <el-radio :label="0"><span>0分</span>知道周围人们的关系，知道常见人物称谓的意义(如祖孙、叔伯、姑姨、婆媳等)；
                    <div  class="tips" style="margin-left: 65px">可分辨陌生人的大致年龄和身份，可用适当称呼</div></el-radio>
                </el-radio-group>
              </el-form-item>
              <el-form-item label="社会交往能力" prop="socialSkillsScore">
                <el-radio-group v-model="society.socialSkillsScore"  @change="checkChangesociety">
                  <el-radio :label="4"><span>4分</span>难以与人接触</el-radio>
                  <el-radio :label="3"><span>3分</span>勉强可与人交往，谈吐内容不清楚，表情不恰当</el-radio>
                  <el-radio :label="2"><span>2分</span>脱离社会，可被动接触，不会主动待人，谈话中很多不适词句，容易上当受骗</el-radio>
                  <el-radio :label="1"><span>1分</span>能适应单纯环境（如社区日间照料中心、养老机构内环境等），主动接触人，
                    <div  class="tips" style="margin-left: 65px">初见面时难让人发现智力问题，不能理解隐喻语</div></el-radio>

                  <el-radio :label="0"><span>0分</span>参与社会，在社会环境有一定的适应能力，待人接物恰当</el-radio>
                </el-radio-group>
              </el-form-item>
              <el-form-item label="社会参与总分" >
                <div class="tips"  ><div>{{societyfraction}}分</div></div>
              </el-form-item>
              <el-form-item label="社会参与分级"  prop="grade" @change="checkChange">
                <el-radio-group v-model="society.grade" :disabled="true">
                  <el-radio :label="0">0 能力完好：总分0-2分</el-radio>
                  <el-radio :label="1">1 轻度受损：总分3-7分</el-radio>
                  <el-radio :label="2">2 中度受损：总分8-13分</el-radio>
                  <el-radio :label="3">3 重度受损：总分14-20分</el-radio>
                </el-radio-group>
              </el-form-item>

            </el-form>
            <el-button style="float: right" @click="revisesociety()" type="primary" v-if="this.status==false">
              保存修改
            </el-button>
          </el-tab-pane>
          <el-tab-pane label="评估报告" name="six" >
            <h2 style="text-align: center">
              老年人自理能力评估报告
            </h2>
            <el-form class="assessmentform" :model="ability"  label-width="120px" label-position="top" style="margin-bottom: 50px">

              <el-form-item label="一级指标分级">
                <span >日常生活活动  <span style="color: #1386d2">{{ability.adAssessmentGrade}} 级</span></span></br>
                <span>精神状态 <span style="color: #1386d2">{{ability.msAssessmentGrade	}} 级</span></span></br>
                <span>感知觉与沟通 <span style="color: #1386d2">{{ability.pcAssessmentGrade}} 级</span></span></br>
                <span>社会参与 <span style="color: #1386d2">{{ability.spAssessmentGrade	}} 级</span></span>


              </el-form-item>
              <el-form-item label="老年人能力初步等级" prop="abilityInitialLevel">
                <el-radio-group v-model="ability.abilityInitialLevel" >
                  <el-radio :label="3"  :disabled="true"><span class="right">3 重度失能</span></el-radio>
                  <el-radio :label="2" :disabled="true"><span>2 中度失能</span></el-radio>
                  <el-radio :label="1" :disabled="true"><span>1 轻度失能</span></el-radio>
                  <el-radio :label="0" :disabled="true"><span>0 能力完好</span></el-radio>
                </el-radio-group>

              </el-form-item>
              <el-form-item label="等级变更条款" prop="changeClause"  v-if="ability.changeClause">

                <el-radio-group   v-model="ability.changeClause[0]" @change="changeClause" >
                  <el-radio :label="1" :disabled="isdisabled" ><span class="right">1 有认知障碍/痴呆、精神疾病者，在原有能力级别上提高一个等级；
</span></el-radio>
                  <el-radio :label="2" :disabled="isdisabled"><span>2 近30天内发生过2次及以上跌倒、噎食、自杀、走失者，在原有能力级别上提高一个等级；</span></el-radio>
                  <el-radio :label="3" :disabled="isdisabled"><span>3 处于昏迷状态者，直接评定为重度失能；</span></el-radio>
                  <el-radio :label="4" :disabled="true"><span>4 若初步等级确定为“3重度失能”，则不考虑上述1-3中各情况对最终等级的影响，等级不再提高</span></el-radio>
                </el-radio-group>

              </el-form-item>
              <el-form-item label="老年人能力最终等级" prop="abilityFinalLevel">
                <el-radio-group v-model="ability.abilityFinalLevel">
                  <el-radio :label="3" :disabled="true" ><span class="right">3 重度失能
</span></el-radio>
                  <el-radio :label="2" :disabled="true"><span>2 中度失能</span></el-radio>
                  <el-radio :label="1" :disabled="true"><span>1 轻度失能</span></el-radio>
                  <el-radio :label="0" :disabled="true"><span>0 能力完好</span></el-radio>
                </el-radio-group>

              </el-form-item>
              <el-form-item>
                <div class="tips"><div>注：老年人能力初步等级划分标准</div></div>

                <div class="tips" ><div><span style="color: #333333;font-size: 14px;font-weight: bold">0 能力完好</span></div></div>
                <div class="tips" ><div>日常生活活动、精神状态、感知觉与沟通分级均为0，社会参与分级为0或1</div></div>

                <div class="tips" ><div><span style="color: #333333;font-size: 14px;font-weight: bold">1 轻度失能</span></div></div>
                <div class="tips" >
                  <div>
                    日常生活活动分级为0，但精神状态、感知觉与沟通中至少一项分级为1及以上，或社会参与的分级为2；
                  </div>
                  <div class="tips">
                    或日常生活活动分级为1，精神状态、感知觉与沟通、社会参与中至少有一项的分级为0或1
                  </div>
                  <div class="tips" ><div><span style="color: #333333;font-size: 14px;font-weight: bold">2 中度失能</span></div></div>
                  <div class="tips">
                    日常生活活动分级为1，但精神状态、感知觉与沟通、社会参与均为2，或有一项为3；
                  </div>
                  <div class="tips">
                    或日常生活活动分级为2，且精神状态、感知觉与沟通、社会参与中有1-2项的分级为1或2
                  </div>
                  <div class="tips" ><div><span style="color: #333333;font-size: 14px;font-weight: bold">3 重度失能</span></div></div>
                  <div class="tips">
                    日常生活活动的分级为3；
                  </div>
                  <div class="tips">
                    或日常生活活动、精神状态、感知觉与沟通、社会参与分级均为2；
                  </div>
                  <div class="tips">
                    或日常生活活动分级为2，且精神状态、感知觉与沟通、社会参与中至少有一项分级为3
                  </div>
                </div>

              </el-form-item>


            </el-form>
            <el-button style="float: right" @click="revisemake()" type="warning" v-if="this.status==false" :disabled="isbutton">
              提交报告
            </el-button>
          </el-tab-pane>
        </el-tabs>
      </template>


    </el-dialog>

	</div>

</template>

<script>
	import { elderlyfilePage, addSelfCareEvaluationRecord, removeEvaluationRecord, searchRecentSelfCareEvaluationRecord, modifySelfCareEvaluationRecord, searchSelfCareEvaluationRecordOfCondition, submitEvaluationRecord,searchrole } from "@/api/assessmentRecord"
  import {startSelfCareEvaluationRecord,addAssessmentOfActivitiesOfDailyLiving,addMentalStateAssessment,addPerceptionAndCommunicationAssessment,addSocialParticipationAssessment,searchinitAssessmentReport,addAssessmentReport,searchSelfCareEvaluationRecordsOfPage,searchSelfCareEvaluationRecordVO}from "@/api/assessmentRecord"
  import { regionDataPlus} from 'element-china-area-data'
	import { parseTime} from "@/utils/index";
  import Template from "../nursing/template";
  import Print from '@/utils/print'
  import Vue from 'vue'
  Vue.use(Print)
	export default {
		name: "AssessmentRecord",
      components: {Template},
      filters:{
			parseTime: parseTime
		},
		data() {
			return {
          active:1,
          actives:1,
          status:"",//报告状态
          isbutton:false,
          provinceAndCity: regionDataPlus,
          width:'550px',
          disableds:false,
          assessmentRecordsVisibles:false,
          selectedOption: [],
          options:[],
          from:{
              elderlyName:"",
              liveAdress:{
                  city:"",//市
                  county:"",//县/区
                  province:"",//省份
                  xxaddress:"",//详细地址
              },
          },
          activeName: 'first',
          form:{
              evaluationType:"",//评估类别
              evaluationTypeName:"",
              evaluationDate:new Date(),//评估日期
              elderlyCode:"",
              evaluationor:""//评估员
          },
          ability:{
              adAssessmentGrade:"",
              abilityFinalLevel:"",
              abilityInitialLevel:"",
              changeClause:"",
              msAssessmentGrade:"",
              pcAssessmentGrade:"",
              spAssessmentGrade:"",
              number:"",
          },
				checkedInTime: [],
				listLoading: true,
				total: 0,
				background: true,
          isdisabled:false,
				id: 0,
				list: [],
          fraction:"",
          spiritfraction:"",
          societyfraction:"",
				assessmentVisible: false,
				activeRow: {},
				assessmentIsEdit: false,
				queryForm: {
					currPageNo: 1,
					limit: 10,
					elderlyCode: '',
					elderlyName: '',
            elderlyNameOrMcode:"",
					// checkedInTimeStart: '',
					// checkedInTimeEnd: '',
				},
				planRules: {
            bedChairTransferScore: [
						{ required: true, message: '请选择选项', trigger: 'change' }
					],
            decorateScore: [
						{ required: true, message: '请选择选项', trigger: 'change' }
					],
            downStairsScore: [
						{ required: true, message: '请选择选项', trigger: 'change' }
					],
            eatScore: [
						{ required: true, message: '请选择选项', trigger: 'change' }
					],
            walkingOnFlatGroundScore: [
                { required: true, message: '请选择选项', trigger: 'change' }
            ],
            gardScore: [
                { required: true, message: '请选择选项', trigger: 'change' }
            ],
            goToiletScore: [
                { required: true, message: '请选择选项', trigger: 'change' }
            ],
            laveScore: [
                { required: true, message: '请选择选项', trigger: 'change' }
            ],
            stoolScore: [
                { required: true, message: '请选择选项', trigger: 'change' }
            ],
            urineScore: [
                { required: true, message: '请选择选项', trigger: 'change' }
            ],
				},
          number:"",
				assessmentform: {
            bedChairTransferScore: '',
            decorateScore: '',
            downStairsScore: '',
            eatScore: '',
            gardScore:'',
            goToiletScore:'',
            laveScore:'',
            stoolScore:'',
            urineScore:'',
            totalScore:"",
            walkingOnFlatGroundScore:'',
            grade:'',
            number:"",
				},
          spiritRules: {
              aggressiveBehaviorScore: [
                  {required: true, message: '请选择选项', trigger: 'change'}
              ],
              cognitiveAbilityScore: [
                  {required: true, message: '请选择选项', trigger: 'change'}
              ],
              depressionSymptomsScore: [
                  {required: true, message: '请选择选项', trigger: 'change'}
              ],


          },
          spirit:{
              aggressiveBehaviorScore: '',
              cognitiveAbilityScore: '',
              depressionSymptomsScore: '',
              grade: '',
              number:"",
              totalScore:"",

          },
          perceptionRules: {
              communicationScore: [
                  {required: true, message: '请选择选项', trigger: 'change'}
              ],
              hearingScore: [
                  {required: true, message: '请选择选项', trigger: 'change'}
              ],
              levelOfConsciousnessScore: [
                  {required: true, message: '请选择选项', trigger: 'change'}
              ],
              visionScore: [
                  {required: true, message: '请选择选项', trigger: 'change'}
              ],


          },
          perception:{
              communicationScore: '',
              hearingScore: '',
              levelOfConsciousnessScore: '',
              visionScore: '',
              grade: '',
              number:"",

          },
          societyRules: {
              abilityToWorkScore: [
                  {required: true, message: '请选择选项', trigger: 'change'}
              ],
              characterOrientationScore: [
                  {required: true, message: '请选择选项', trigger: 'change'}
              ],
              socialSkillsScore: [
                  {required: true, message: '请选择选项', trigger: 'change'}
              ],
              spatialOrientationScore: [
                  {required: true, message: '请选择选项', trigger: 'change'}
              ],
              survivalSkillsScore: [
                  {required: true, message: '请选择选项', trigger: 'change'}
              ],

          },
          society:{
              abilityToWorkScore: '',
              characterOrientationScore: '',
              socialSkillsScore: '',
              spatialOrientationScore: '',
              survivalSkillsScore: '',
              grade: '',
              number:'',
              totalScore:"",
          },
				assessmentRecordsVisible: false,
				assessmentRecords: [],
				assessmentRecordsLoading: false,
				assessmentRecordsQueryForm: {
					currPageNo: 1,
					limit: 10,
            elderlyCondition:"",
				},
				assessmentRecordsTotal: 0,
				activeElderlyRow: {},
				showMask: false,
			};
		},

		created(){

			this.queryForm.institutionNumber= JSON.parse(localStorage.getItem("institutionNumber"));
			this.searchrole()
			this.search()
		},
		methods: {

			search(){
				this.listLoading = true;
				elderlyfilePage(this.queryForm).then(res =>{
					this.list = res.data.data
					this.total = res.data.total
					setTimeout(() => {
						this.listLoading = false;
					}, 50);
				})
			},

        searchrole(){
            this.listLoading = true;
            let institutionNumber=JSON.parse(localStorage.getItem("institutionNumber"));
            searchrole({institutionNumber}).then(res =>{
                console.log(res)
                this.options = res.data

                      this.form.evaluationor=localStorage.getItem("username")

                setTimeout(() => {
                    this.listLoading = false;
                }, 50);
            })
        },
        prves(){
            --this.actives
            if(this.actives<0){
                this.actives=1
            }
        },
        changeClause(value){

            this.ability.abilityFinalLevel=this.ability.abilityInitialLevel
            if(value==2 || value==1 ){
                console.log(this.ability.abilityFinalLevel)
                this.ability.abilityFinalLevel=this.ability.abilityFinalLevel+1
            }
            else if(value==3){
                this.ability.abilityFinalLevel=3
            }

        },
        nexts(){
            if(this.actives==1){

                this.$refs['assessmentform'].validate((valid) => {
                    		if (valid) {

                    		     this.assessmentform.totalScore=this.fraction

                              this.assessmentform.number=this.number

                            addAssessmentOfActivitiesOfDailyLiving(this.assessmentform).then(res =>{
                                console.log(res)

                                this.actives=2


                            })


                    		}else {

                         }
                })
            }else if(this.actives==2) {

                this.$refs['spirit'].validate((valid) => {
                    if (valid) {

                        this.spirit.number=this.number
                        this.spirit.totalScore=this.spiritfraction
                        addMentalStateAssessment(this.spirit).then(res =>{
                            console.log(res)
                            this.actives=3


                        })

                    }else {

                    }
                })
            }else if(this.actives==3) {
                this.$refs['perception'].validate((valid) => {
                    if (valid) {


                        this.perception.number=this.number
                        addPerceptionAndCommunicationAssessment(this.perception).then(res =>{
                            console.log(res)
                            this.actives=4

                        })


                    }else {

                     }
                })
            }






        },
        open(){

                console.log(  this.$refs.boxs.scrollTop)

        },
        next(){
			      // if(this.active++>3){
            //       this.active=1
            // }


            console.log(this.active)
            if(this.actives==1){

                startSelfCareEvaluationRecord(this.form).then(res =>{
                    console.log(res.data)
                    this.number=res.data
                    this.width="900px"
                    this.active=2


                })
            }
           if(this.actives==4){
               this.$refs['society'].validate((valid) => {
                   if (valid) {
                       this.society.number=this.number
                       this.society.totalScore=this.societyfraction
                       addSocialParticipationAssessment(this.society).then(res =>{
                           console.log(res)
                           this.active=3
                           if(res.code==200){
                               let number=this.number
                               searchinitAssessmentReport({number}).then(res =>{
                                   console.log(res)

                                   this.ability=res.data
                                   if(res.data.abilityInitialLevel==3){
                                     this.isdisabled=true
                                   }else {
                                      this.ability.abilityFinalLevel=res.data.abilityInitialLevel
                                       this.isdisabled=false
                                   }


                               }
                               )

                               }



                       })
                   }else {

                   }
               })
           }



        },

        prve(){
           --this.active
            if(this.active<0){
                  this.active=1
            }
            if(this.active==1){
                this.width="550px"
            }
        },
        addAssessmentReport(){
           console.log(this.ability)
            this.ability.number=this.number
            addAssessmentReport(this.ability).then(res =>{
                console.log(res)
                this.$baseMessage("评估完成");
                this.assessmentVisible=false



            })

        },
			getAssessmentRecords(){

				this.assessmentRecordsLoading = true;
				this.assessmentRecordsQueryForm.elderlyCondition = this.activeElderlyRow.elderlyCode
          searchSelfCareEvaluationRecordsOfPage(this.assessmentRecordsQueryForm).then(res =>{
					this.assessmentRecords = res.data.data
					this.assessmentRecordsTotal = res.data.total

					setTimeout(() => {
						this.assessmentRecordsLoading = false;
					}, 50);
				})

			},
			handleSizeChange(val) {
				this.queryForm.limit = val;
				this.search();
			},
			handleCurrentChange(val) {
				this.queryForm.currPageNo = val;
				this.search();
			},
			assessmentRecordsHandleSizeChange(val) {
				this.assessmentRecordsQueryForm.limit = val;
				this.getAssessmentRecords();
			},
			assessmentRecordsHandleCurrentChange(val) {
				this.assessmentRecordsQueryForm.currPageNo = val;
				this.getAssessmentRecords();
			},
			openAssessment(row) {

          console.log(row)
          let  elderlyCode=row.elderlyCode
          searchRecentSelfCareEvaluationRecord({elderlyCode}).then(res =>{
                console.log(res.data)
              if(res.data){
                   this.disableds=true
                  this.form.evaluationType=2
              }else {
                  this.disableds=false
                  this.form.evaluationType=1
              }
          })
          this.active=1
          this.actives=1
          this.width='550px',
          this.form.elderlyCode=row.elderlyCode

          this.form.evaluationDate=new Date()
          this.form.evaluationor=localStorage.getItem("username")
          this.fraction=0
          this.spiritfraction=0
          this.societyfraction=0
          this.from.elderlyName=row.elderlyName
          this.from.liveAdress=row.liveAdress
          let liveAdress=[row.liveAdress.province,row.liveAdress.city,row.liveAdress.county]
          this.selectedOption = liveAdress
				  this.assessmentVisible = true;
				  this.assessmentIsEdit = false;
				  this.activeRow = row;
				  this.initForm()
          this.initspirit()
          this.initperception()
          this.initsociety()

			},
        initability(){
			    this.ability={
              adAssessmentGrade:"",
              abilityFinalLevel:"",
              abilityInitialLevel:"",
              changeClause:[],
              msAssessmentGrade:"",
              pcAssessmentGrade:"",
              spAssessmentGrade:"",
              number:"",
          }

        },
		   	initForm(){
          this.assessmentform={
              bedChairTransferScore: '',
                  decorateScore: '',
                  downStairsScore: '',
                  eatScore: '',
                  gardScore:'',
                  goToiletScore:'',
                  laveScore:'',
                  stoolScore:'',
                  urineScore:'',
                  totalScore:"",
                  walkingOnFlatGroundScore:'',
                  grade:'',
                  number:"",
          }
			},
        initspirit(){
            this.spirit={
                    aggressiveBehaviorScore: '',
                    cognitiveAbilityScore: '',
                    depressionSymptomsScore: '',
                    grade: '',
                    number:"",
                    totalScore:"",

            }
        },
        initperception(){
            this.perception={
                communicationScore: '',
                    hearingScore: '',
                    levelOfConsciousnessScore: '',
                    visionScore: '',
                    grade: '',
                    number:"",



            }
        },
        initsociety(){
            this.society={
                abilityToWorkScore: '',
                    characterOrientationScore: '',
                    socialSkillsScore: '',
                    spatialOrientationScore: '',
                    survivalSkillsScore: '',
                    grade: '',
                    number:'',
                    totalScore:"",
            }
        },
        checkChange(){

             let  number=Number(this.assessmentform.bedChairTransferScore)+Number(this.assessmentform.decorateScore)+Number(this.assessmentform.downStairsScore) +Number(this.assessmentform.eatScore)+Number(this.assessmentform.gardScore)+Number(this.assessmentform.goToiletScore)+Number(this.assessmentform.laveScore)+  Number(this.assessmentform.stoolScore)+Number(this.assessmentform.urineScore)+Number(this.assessmentform.walkingOnFlatGroundScore)
            console.log(number)

             this.fraction=number
            if(number==100){
                this.assessmentform.grade=0
            }else if(number>=65&&number<=95){
                this.assessmentform.grade=1
            }else if(number>=45&&number<=60){
                this.assessmentform.grade=2
            }else if(number<=40){
                this.assessmentform.grade=3
            }

        },
        checkChangespirit(){
            let  number=Number(this.spirit.aggressiveBehaviorScore)+Number(this.spirit.cognitiveAbilityScore)+Number(this.spirit.depressionSymptomsScore)
            this.spiritfraction=number
            if(number==0){
                this.spirit.grade=0
            }else if(number==1){
                this.spirit.grade=1
            }else if(number>=2&&number<=3){
                this.spirit.grade=2
            }else if(number>=4&&number<=6){
                this.spirit.grade=3
            }
        },
        checkChangeperception(){
            if(this.perception.visionScore==4 ||this.perception.hearingScore==4 || this.perception.communicationScore==3 || this.perception.levelOfConsciousnessScore==2 ||this.perception.levelOfConsciousnessScore==3) {

                this.perception.grade = 3

            } else if(this.perception.levelOfConsciousnessScore==0 && this.perception.visionScore==2 ||this.perception.levelOfConsciousnessScore==0 && this.perception.hearingScore==2 ||this.perception.levelOfConsciousnessScore==0 &&this.perception.communicationScore==1){
                this.perception.grade = 1
            }else if(this.perception.levelOfConsciousnessScore==0 && this.perception.visionScore==3 ||this.perception.levelOfConsciousnessScore==0 && this.perception.hearingScore==3 ||this.perception.levelOfConsciousnessScore==0&&this.perception.communicationScore==2 ||this.perception.levelOfConsciousnessScore==1&&this.perception.visionScore<3&&this.perception.communicationScore<2||this.perception.levelOfConsciousnessScore==1&&this.perception.hearingScore<3&&this.perception.communicationScore<2){
                this.perception.grade = 2
            }
            else if(this.perception.levelOfConsciousnessScore==0 && this.perception.visionScore==0 || this.perception.visionScore==1|| this.perception.hearingScore==1 ||this.perception.hearingScore==0&&this.perception.communicationScore==0){
                this.perception.grade = 0
            }



         },
        checkChangesociety(){
            let  number=Number(this.society.abilityToWorkScore)+Number(this.society.characterOrientationScore)+Number(this.society.socialSkillsScore) +Number(this.society.spatialOrientationScore)+Number(this.society.survivalSkillsScore)

            this.societyfraction=number
            if(number>=0&&number<=2){
                this.society.grade=0
            }else if(number>=3&&number<=7){
                this.society.grade=1
            }else if(number>=8&&number<=13){
                this.society.grade=2
            }else if(number>=14&&number<=20){
                this.society.grade=3
            }
        },
			// checkChange(list, index, value){
			// 	this.assessmentform['radio0'] = value
			// 	if(list.length){
			// 		for(let i=1; i<=3; i++){
			// 			if(index != i){
			// 				this.assessmentform['checkbox' + i] = []
			// 			}
			// 		}
			// 	}else{
			// 		this.assessmentform['radio0'] = ''
			// 	}
			// 	this.clearChild(index)
			// },
			// checkChildChange(list, length, index, value, a, b, c){
			// 	let v = this.assessmentform[index]
			// 	let i = v.indexOf(value)
			// 	if(list.indexOf(4001) != -1){
			// 		if(i == -1){
			// 			this.assessmentform[index].push(value)
			// 		}
			// 		this.checkChange(a, b, c)
			// 		return false
			// 	}
			// 	if(list.length >= length){
			// 		if(i == -1){
			// 			this.assessmentform[index].push(value)
			// 		}
			// 		this.checkChange(a, b, c)
			// 	}else{
      //
			// 		i != -1 && (this.assessmentform[index].splice(i, 1))
			// 		if(!this.assessmentform[index].length){
			// 			this.assessmentform['radio0'] = ''
			// 		}
			// 	}
			// 	this.clearChild(b)
			// },
			// clearChild(b){
			// 	switch(b){
			// 		case 1:
			// 			this.assessmentform.checkboxChild3 = []
			// 			this.assessmentform.checkboxChild4 = []
			// 			this.assessmentform['checkbox2'] = []
			// 			this.assessmentform['checkbox3'] = []
			// 			break;
			// 		case 2:
			// 			this.assessmentform.checkboxChild1 = []
			// 			this.assessmentform.checkboxChild2 = []
			// 			this.assessmentform.checkboxChild4 = []
			// 			this.assessmentform['checkbox1'] = []
			// 			this.assessmentform['checkbox3'] = []
			// 			break;
			// 		case 3:
			// 			this.assessmentform.checkboxChild1 = []
			// 			this.assessmentform.checkboxChild2 = []
			// 			this.assessmentform.checkboxChild3 = []
			// 			this.assessmentform['checkbox1'] = []
			// 			this.assessmentform['checkbox2'] = []
			// 			break;
			// 	}
			// },
			// saveAssessment(){
			// 	this.$refs['assessmentform'].validate((valid) => {
			// 		if (valid) {
			// 			let assessmentform = this.assessmentform
			// 			let from = {}
			// 			from.onePipeline = assessmentform.checkbox1.indexOf('a1') != -1
			// 			from.onePipelineDetail = from.onePipeline ? assessmentform.checkboxChild1 : []
			// 			from.moreMedicalTreatment = assessmentform.checkbox1.indexOf('a6') != -1
			// 			from.medicalTreatmentDetail = from.moreMedicalTreatment ? assessmentform.checkboxChild2 : []
			// 			from.twoPipeline = assessmentform.checkbox2.indexOf('b1') != -1
			// 			from.twoPipelineDetail = from.twoPipeline ? assessmentform.checkboxChild3 : []
			// 			from.acuteMedicalTreatment = assessmentform.checkbox2.indexOf('b6') != -1
			// 			from.threePipeline = assessmentform.checkbox3.indexOf('c1') != -1
			// 			from.threePipelineDetail = from.threePipeline ? assessmentform.checkboxChild4 : []
			// 			from.intensiveCare = assessmentform.checkbox3.indexOf('c7') != -1
			// 			from.fallDown = assessmentform.fallDown
			// 			from.activityFraction = from.fallDown ? assessmentform.radio1 - 1 : assessmentform.radio1
			// 			from.dietFraction = assessmentform.radio2
			// 			from.excretionFraction = assessmentform.radio3
			// 			from.cognitionFraction = assessmentform.radio4
			// 			from.score = assessmentform.radio0 + from.activityFraction + from.dietFraction + from.excretionFraction + from.cognitionFraction
			// 			if(this.assessmentIsEdit){
			// 				modifySelfCareEvaluationRecord(this.number, from).then(res => {
			// 					this.getAssessmentRecords()
			// 					this.assessmentVisible = false
			// 				})
			// 			}else{
			// 				addSelfCareEvaluationRecord(this.activeRow.elderlyCode, from).then(res => {
			// 					this.getAssessmentRecords()
			// 					this.assessmentVisible = false
			// 				})
			// 			}
			// 		}
			// 	})
			// },
			// editAssessment(row, see){
			// 	this.showMask = see
			// 	this.assessmentVisible = true
			// 	this.assessmentIsEdit = true;
			// 	this.initForm()
			// 	this.$nextTick(() => {
			// 		this.$refs['assessmentform'].clearValidate()
			// 	})
			// 	// searchRecentSelfCareEvaluationRecord({ elderlyCode: row.elderlyCode}).then(res =>{
			// 		let from = { ...row }
			// 		let rowForm = {
			// 			radio0: '',
			// 			radio1: from.fallDown ? from.activityFraction + 1 : from.activityFraction,
			// 			radio2: from.dietFraction,
			// 			radio3: from.excretionFraction,
			// 			radio4: from.cognitionFraction,
			// 			checkbox1: [],
			// 			checkbox2: [],
			// 			checkbox3: [],
			// 			checkboxChild1: from.onePipelineDetail ? (from.onePipelineDetail.substring(0, from.onePipelineDetail.length - 1).split(',').map(Number)) : [],
			// 			checkboxChild2: from.medicalTreatmentDetail ? (from.medicalTreatmentDetail.substring(0, from.medicalTreatmentDetail.length - 1).split(',').map(Number)) : [],
			// 			checkboxChild3: from.twoPipelineDetail ? (from.twoPipelineDetail.substring(0, from.twoPipelineDetail.length - 1).split(',').map(Number)) : [],
			// 			checkboxChild4: from.threePipelineDetail ? (from.threePipelineDetail.substring(0, from.threePipelineDetail.length - 1).split(',').map(Number)) : [],
			// 			fallDown: from.fallDown,
			// 		}
			// 		rowForm.radio0 = from.score - from.activityFraction - rowForm.radio2 - rowForm.radio3 - rowForm.radio4
			// 		from.onePipeline && (rowForm.checkbox1.push('a1'))
			// 		from.moreMedicalTreatment && (rowForm.checkbox1.push('a6'))
			// 		from.twoPipeline && (rowForm.checkbox2.push('b1'))
			// 		from.acuteMedicalTreatment && (rowForm.checkbox2.push('b6'))
			// 		from.threePipeline && (rowForm.checkbox3.push('c1'))
			// 		from.intensiveCare && (rowForm.checkbox3.push('c7'))
			// 		this.assessmentform = rowForm
			// 		this.number = from.number
			// 	// })
			// },
			// delAssessment(number){
			// 	this.$baseConfirm("你确定要删除当前评估记录吗", null, async () => {
			// 		const {code, msg } = await removeEvaluationRecord({number});
			// 		if(code==200){
			// 			this.$baseMessage("删除成功", 'success');
			// 			this.getAssessmentRecords()
			// 		}else {
			// 			this.$baseMessage("删除失败", 'error');
			// 		}
			// 	});
			// },

			submitAssessment(size,number){

          this.number=number
          this.from.elderlyName=this.activeElderlyRow.elderlyName

          this.from.liveAdress=this.activeElderlyRow.liveAdress
          let liveAdress=[this.activeElderlyRow.liveAdress.province,this.activeElderlyRow.liveAdress.city,this.activeElderlyRow.liveAdress.county]
          this.selectedOption = liveAdress
           this.activeName="first"
         if(size==0){

             this.assessmentRecordsVisibles=false

         }else {

             this.assessmentRecordsVisibles=true

         }




          searchSelfCareEvaluationRecordVO({number}).then(res =>{

              this.form.evaluationType=res.data.evaluationType
              this.form.evaluationor=res.data.evaluationor
              this.form.evaluationDate=res.data.evaluationDate
              this.form.evaluationTypeName=res.data.evaluationTypeName
              this.status=res.data.status
              console.log(this.status)
              if(res.data.assessmentOfActivitiesOfDailyLiving){

                  this.assessmentform=res.data.assessmentOfActivitiesOfDailyLiving

                  this.assessmentform.number=number
                  this.fraction=res.data.assessmentOfActivitiesOfDailyLiving.totalScore
              }else {
                  this.fraction=0
                  this.initForm()


                  this.assessmentform.number=number
              }
              if(res.data.mentalStateAssessment){

                  this.spirit=res.data.mentalStateAssessment
                  this.spiritfraction=res.data.mentalStateAssessment.totalScore
                  this.spirit.number=number
              }else {

                  this.spiritfraction=0
                  this.initspirit()
                  this.spirit.number=number

              }
              if(res.data.perceptionAndCommunicationAssessment	){


                  this.perception=res.data.perceptionAndCommunicationAssessment
                  this.perception.number=number

              }else {


                  this.initperception()
                  this.perception.number=number

              }
              if(res.data.socialParticipationAssessment){

                  this.society=res.data.socialParticipationAssessment
                  this.societyfraction=res.data.socialParticipationAssessment.totalScore
                  this.society.number=number
              }else {
                  this.societyfraction=0
                  this.initsociety()
                  this.society.number=number
              }
              if(res.data.selfCareAbilityAssessmentReport){

                  this.ability=res.data.selfCareAbilityAssessmentReport
                  this.ability.number=number

              }else {
                   this.initability()
                  this.ability.number=number

              }
          })

			},
        stamp(size,number){
            console.log(this.assessmentform)

            this.submitAssessment(size,number)
            setTimeout(() => {

                this.$print(this.$refs.print, { size })

            }, 2000);





        },
        revise(){


            this.$refs['assessmentform'].validate((valid) => {
                if (valid) {

                    this.assessmentform.totalScore=this.fraction
                    console.log(this.assessmentform)

                    addAssessmentOfActivitiesOfDailyLiving(this.assessmentform).then(res =>{
                        console.log(res)
                        this.$baseMessage("保存成功");



                    })


                }else {

                }
            })
        },
        revisespirit(){
            this.$refs['spirit'].validate((valid) => {
                if (valid) {
                    this.spirit.totalScore=this.spiritfraction
                    addMentalStateAssessment(this.spirit).then(res =>{
                        console.log(res)
                        this.$baseMessage("保存成功");


                    })

                }else {

                }
            })
        },
        reviseperception(){
            this.$refs['perception'].validate((valid) => {
                if (valid) {

                    addPerceptionAndCommunicationAssessment(this.perception).then(res =>{
                        console.log(res)
                        this.$baseMessage("保存成功");


                    })

                }else {

                }
            })
        },
        revisesociety(){
            this.$refs['society'].validate((valid) => {
                if (valid) {
                    this.society.totalScore=this.societyfraction
                    addSocialParticipationAssessment(this.society).then(res => {
                        console.log(res)
                        this.$baseMessage("保存成功");


                    })




                }else {

                }
            })
        },
        revisemake(){
            console.log(this.ability)
            this.ability.number=this.number
            addAssessmentReport(this.ability).then(res =>{
                console.log(res)
                this.$baseMessage("评估完成");
                 this.assessmentRecordsVisibles=false
                 this.getAssessmentRecords()



            })
        },
        tabclick(tab,event){
            if(tab.name=='six'){


                    let number=this.number
                    searchinitAssessmentReport({number}).then(res =>{
                        console.log(res)
                        this.ability=res.data
                        this.isbutton=false
                        if(res.data.abilityInitialLevel==3){
                            this.isdisabled=true
                        }else {
                            this.ability.abilityFinalLevel=res.data.abilityInitialLevel
                            this.isdisabled=false
                        }


                    }).catch(
                        this.isbutton=true
                    )

            }

        },
        closeDialog(){
            this.assessmentRecordsQueryForm.currPageNo=1

        },

        closeDialo(){

            // this.$refs['assessmentform'].resetFields();
            // this.$refs['spirit'].resetFields();
            // this.$refs['perception'].resetFields();
            // this.$refs['society'].resetFields();
        },
		}
	}
</script>

<style scoped>
  .right{
    margin-right: 11px !important;
  }


  .basicarchives >>> .is-disabled input {
    border: 0 !important;
    background-color: white !important;
    color: #606266;
  }
  .basicarchives >>> .is-disabled .el-input__suffix{
    display: none !important;
  }
  .margin >>> .el-form-item__label{
    margin-top: 5px;
    width: 89px !important;
    padding: 0;
  }
  .margin >>> .el-form-item__content{
    margin-left: 89px !important;
  }
  .table-mechanism >>> .el-table .warning-row {background: oldlace;opacity: 0.5;}
	.table-mechanism >>> .el-table .success-row {background: #f0f9eb;}
	.tableHeader{padding:20px 10px;}
	.itemRow{display: inline-block;}
	.assessmentform >>> .el-radio__label > span{margin-right: 20px;}
	.assessmentform >>> .el-form-item__label{color: #409EFF;font-weight: 500;font-size: 16px;padding-bottom: 5px;margin-left: -12px;}
	.assessmentform >>> .el-form-item{margin-bottom: 10px;padding-left: 20px; border-bottom: 1px solid #ccc;padding-bottom: 24px;}
	.assessmentform >>> .el-form-item:first-child{padding-top: 12px;}
	.assessmentform >>> .el-checkbox-group{margin-left: 20px;}
	.assessmentform >>> .rowMain > .el-checkbox-group{line-height: 20px;margin-bottom: 15px;position: relative;top: 12px;margin-left: 0;}
	.tips{padding-bottom: 6px;padding-top: 4px;}
	.tips > div{margin-bottom: 8px;line-height: 20px;}
	.assessmentform >>> .el-radio{display: block;line-height: 24px;}
	.assessmentform >>> .el-checkbox__input.is-disabled + span.el-checkbox__label{color: #606266;}
	.assessmentform >>> .el-checkbox-group{display: inline-block;}
	.assessmentform >>> .el-checkbox__input.is-disabled.is-checked .el-checkbox__inner:after{border-color: #1890ff;}
	.assessmentform >>> .el-checkbox__input.is-disabled.is-checked .el-checkbox__inner{border-color: #1890ff;}
	.assessmentform >>> .el-radio__input.is-disabled.is-checked .el-radio__inner:after{border-color: #1890ff;background: #1890ff;}
	.assessmentform >>> .el-radio__input.is-disabled.is-checked .el-radio__inner{border-color: #1890ff;}
	.assessmentform >>> .el-radio__input.is-disabled + span.el-radio__label{color: #606266;}
	.showMask{position: absolute;width: 95%;height: 88%;z-index: 2;}
	.assessmentform{border: 1px solid #ccc;border-bottom: 0;padding: 0;padding-right: 0 !important;}
  .mytable
  {
    border-collapse: collapse;
    margin: 0 auto;
    text-align: center;
  }
  .mytable td, table th
  {
    border: 1px solid rgba(59,65,81,.3);
    height: 45px;
  }
  .mytable .ttitle
  {
    background-color: #F5FAFA;
    width: 10%;
  }
  .mytable tr:nth-child(odd)
  {
    background: #fff;
  }
  .mytable .datalist{
    width: 30%;

  }
  .mytables{
    display: none ;
    padding-top: 10px;
  }
  .ttitle >>> .el-radio__input{
    display: none !important;

  }
  .ttitle >>>  .el-radio__label{
    color: #001529;
    height: 100%;
    display: inline-block;
    line-height: 45px;
  }
  .disabled >>>.el-input__suffix-inner{
    display: none !important;
  }
  .is-disabled>>> .el-input__suffix-inner{
    display: none !important;
  }

  .datalist >>> .disabled .el-input__inner{
    color:#333333;border: 0;padding: 0;
    text-align: right;
  }
</style>

